Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Issue with ticks on using decimal ranges #82

Open
palanii opened this issue May 27, 2015 · 0 comments
Open

Issue with ticks on using decimal ranges #82

palanii opened this issue May 27, 2015 · 0 comments

Comments

@palanii
Copy link

palanii commented May 27, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant