diff --git a/projects/ngx-drag-scroll/src/lib/ngx-drag-scroll.component.ts b/projects/ngx-drag-scroll/src/lib/ngx-drag-scroll.component.ts index e540adf..da889d7 100644 --- a/projects/ngx-drag-scroll/src/lib/ngx-drag-scroll.component.ts +++ b/projects/ngx-drag-scroll/src/lib/ngx-drag-scroll.component.ts @@ -218,13 +218,13 @@ export class DragScrollComponent implements OnDestroy, AfterViewInit, OnChanges, ngOnChanges() { this.setScrollBar(); - if (this.xDisabled || this.disabled) { + if (this.xDisabled || this.disabled || this._scrollbarHidden) { this.disableScroll('x'); } else { this.enableScroll('x'); } - if (this.yDisabled || this.disabled) { + if (this.yDisabled || this.disabled || this._scrollbarHidden) { this.disableScroll('y'); } else { this.enableScroll('y');