Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't set decimal range in from and to options #143

Open
rbonillaAlivebox opened this issue Nov 26, 2015 · 2 comments
Open

I can't set decimal range in from and to options #143

rbonillaAlivebox opened this issue Nov 26, 2015 · 2 comments

Comments

@rbonillaAlivebox
Copy link

I need to manage a decimal range in the slider.

In example:

from: 0.005,
to: 0.08,
step: 0.005,
round: 3,
scale: [0.005, 0.04, 0.08]

@darul75
Copy link
Owner

darul75 commented Nov 26, 2015

Hi, I will give a solution soon. I need to give a try first

@darul75
Copy link
Owner

darul75 commented Nov 30, 2015

Could you try something like the following instead:

    var calculate = function( value ) {        
        return value/100;
    };

    $scope.options = {              
        from: 0,
        to: 8,
        step: 0.5,
        round: 1,
        scale: [0.005, 0.04, 0.08],
        smooth: false,
        calculate: calculate,
        callback: function(value, elt) {            
            console.log('new value is ' + value);
        }               
    };

http://jsfiddle.net/darul75/2m3u0qvh/4/

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

No branches or pull requests

2 participants