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

Issue with ticks on using decimal ranges #82

@palanii

Description

@palanii

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions