ui-slider icon indicating copy to clipboard operation
ui-slider copied to clipboard

Issue with ticks on using decimal ranges

Open palanii opened this issue 10 years ago • 0 comments

We are using angular slider with some decimal steps. This is the code we are using:

$scope.slider = { value: 1, options: { useDecimal: true, orientation: 'horizontal', min: 0.5, max: 3, range: 'min', step: 0.5, tick: true, change: refreshSwatch } };

While implementing the ticks, we are not getting any ticks. In postLink method we are calculating the total ticks by. var total = parseInt(parseInt(options['max'])/parseInt(options['step'])); Its returning NaN in our case. Here we'll have to check useDecimal flag before calculating the total. I've replaced this by below and i can able to see ticks on the screen. var total = parseInt(options['max']/options['step']);

Is this something needs to be fixed in the library..?

Thanks, Palanisamy

palanii avatar May 27 '15 10:05 palanii