Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

add limitations to ranges #53

Open
liadlivnat opened this issue Dec 29, 2013 · 1 comment
Open

add limitations to ranges #53

liadlivnat opened this issue Dec 29, 2013 · 1 comment

Comments

@liadlivnat
Copy link

Can you please advise how can i added limitation to the slider
for example i have range slider that i don't want the user can choose value lower than 5.
i handled the left and the right parts, but can't handle the center part
image

but the center is not working when i get into 5 it stopped than you can pull and get to zero

image

this is the code i added to:

var centrer_range_left = scope[refHigh] - newValue;
var centrer_range_right = newValue - scope[refLow];

              if (newValue < 5 || newValue > 95 || newPercent >95 || newPercent < 5 || Math.abs(centrer_range_right - centrer_range_left) < 4 || Math.abs(centrer_range_right - centrer_range_left) == 0 )
              {
                return;
              }
@liadlivnat
Copy link
Author

i added it before end of "onMove" function, but it's not completed, can you help please?

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