Skip to content

upper handle of draggable range jumps to strange places if minValue is not 0 #172

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

Closed
ursgrob opened this issue Nov 10, 2015 · 2 comments
Closed

Comments

@ursgrob
Copy link

ursgrob commented Nov 10, 2015

I created a fiddler demo:

https://jsfiddle.net/rzupvdfs/

move the range compeltely to the left. The high handle will jump to the left for about the same value as defined as floor.

The fix would be in rzslider.js in "onDragMove":

The first if block should look like this:

  if (newOffset <= this.dragging.lowDist)
  {
    if (pointer.rzsl === this.dragging.lowDist) { return; }
    newMinValue = this.minValue;
    newMinOffset = 0;
    newMaxValue = this.minValue + this.dragging.difference; // <-- add minValue
    newMaxOffset = this.valueToOffset(newMaxValue);
  }

Great slider btw :)

@ValentinH
Copy link
Member

Indeed, you are right. I'll fix it once the 2.0.0 version is released (soon). You can see it in the PR list if you want.

ValentinH pushed a commit that referenced this issue Nov 11, 2015
@ValentinH
Copy link
Member

Fixed in master.

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