jkuri / ngx-slimscroll

Customizable Scrollbar Directive for Angular

Home Page:https://ngx-slimscroll.jankuri.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug of options

WahlbergRu opened this issue · comments

Hello

`
constructor(obj?: ISlimScrollOptions) {

this.position = obj && obj.position ? obj.position : 'right'; 

this.barBackground = obj && obj.barBackground ? obj.barBackground : '#343a40';

this.barOpacity = obj && obj.barOpacity ? obj.barOpacity : '1';

this.barWidth = obj && obj.barWidth ? obj.barWidth : '12';

this.barBorderRadius = obj && obj.barBorderRadius ? obj.barBorderRadius : '5';

this.barMargin = obj && obj.barMargin ? obj.barMargin : '1px 0';

this.gridBackground = obj && obj.gridBackground ? obj.gridBackground : '#adb5bd';

this.gridOpacity = obj && obj.gridOpacity ? obj.gridOpacity : '1';

this.gridWidth = obj && obj.gridWidth ? obj.gridWidth : '8';

this.gridBorderRadius = obj && obj.gridBorderRadius ? obj.gridBorderRadius : '10';

this.gridMargin = obj && obj.gridMargin ? obj.gridMargin : '1px 2px';

this.alwaysVisible = obj && typeof obj.alwaysVisible !== 'undefined' ? obj.alwaysVisible : true;

this.visibleTimeout = obj && obj.visibleTimeout ? obj.visibleTimeout : 1000; 

}
`

If we are setup for number 0, script doesn't work. In example gridOpacity = 0. We have a basic value.

I think in constructor need check with type of undefined.

gridOpacity is not working with any values. Did anyone found any solution for this

@akvaliya it should work with values from 0 to 1, just like css opacity property.