Git Product home page Git Product logo

Comments (9)

IonDen avatar IonDen commented on May 24, 2024

Hi, this is not a bug right now. It is slider restriction. Every slider value must be rounded by step. But i will try to add support for this featuer in future.

from ion.rangeslider.

IonDen avatar IonDen commented on May 24, 2024

Done in 1.8.5

from ion.rangeslider.

flip111 avatar flip111 commented on May 24, 2024

This issue has been improved but is still buggy.

min: 796
max: 6299
step: 100
width of slider: 785px

When clicking on the "from" handle the right handle does not snap to another value (this is improved, version 1.8.5 Build: 159).
When clicking on the "from" handle this handle snaps to value 800 (this is still a bug).
When clicking on the "to" handle the handle stays on position 6299 (this is improved, since version 1.8.5 Build: 159)
When moving the "to" handle to the left and back to maximum value this is correct on 6299 (this is improved, since version 1.8.5 Build: 159)
When moving the "from" handle to the right and back to minimum value this is 800 instead of 796 (this is still a bug)

from ion.rangeslider.

IonDen avatar IonDen commented on May 24, 2024

I will check this.

from ion.rangeslider.

KEIII avatar KEIII commented on May 24, 2024

I think this should work:

@@ -711,7 +711,7 @@
-                        nums.fromNumber = Math.round(_from / settings.step) * settings.step;
+                        nums.fromNumber = (_from <= settings.min) ? settings.min : Math.round(_from / settings.step) * settings.step;
@@ -732,7 +732,7 @@
-                        nums.fromNumber = Math.round(_from / settings.step) * settings.step;
+                        nums.fromNumber = (_from <= settings.min) ? settings.min : Math.round(_from / settings.step) * settings.step;
@@ -740,7 +740,7 @@
-                        nums.toNumber = Math.round(_to / settings.step) * settings.step;
+                        nums.toNumber = (_to >= settings.max) ? settings.max : Math.round(_to / settings.step) * settings.step;

from ion.rangeslider.

dirkluijk avatar dirkluijk commented on May 24, 2024

I don't know if this is related, but I have this situation:

{
    min: 4,
    max: 26,
    step: 1.1,
    type: 'double'
}

(the step value is in my application calculated by dividing the range (26 - 4 = 22) by 20, which is 1.1 in this case)

The slider snaps to the following values: 4.4, 5.5, 6.6 ... 25.3, 26.4
Instead of: 4.0, 5.1, 6.2, ... 24.9, 26.0

So, the step value starts at 0 instead of the min value.

Version: 1.9.1, build 171

from ion.rangeslider.

IonDen avatar IonDen commented on May 24, 2024

Hi, friend. I tested step from 0.0 to 1.0, and from 1 to N but i never imagine that the fractional step could be bigger than 1. That is my stupid mistake. So the situation with 1.1 and something like 23.54 step should be buggy. Please create an issue and i will fix it in future update.

from ion.rangeslider.

dirkluijk avatar dirkluijk commented on May 24, 2024

Thanks, will do! ;)

see #106

from ion.rangeslider.

IonDen avatar IonDen commented on May 24, 2024

Should be fine now. Check 2.0 release.

from ion.rangeslider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.