-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Wrong handle position when scaled #279
Comments
Hi @paranoidjk, I just submitted a PR for this. Would appreciate if you could take a look as this is blocking me from using in production (and I don't want to have to go find another slider--this one is great!) Thanks for all of your hard work! |
captbaritone
pushed a commit
to captbaritone/slider
that referenced
this issue
Jul 1, 2017
… width of slider
paranoidjk
pushed a commit
that referenced
this issue
Jul 3, 2017
* Fix #279 - Use getBoundingClientRect for proper scaled width of slider * Fix width mocking in tests. Fix mocking of `getBoundingClientRect`.
Fixed in |
captbaritone
added a commit
to captbaritone/webamp
that referenced
this issue
Jul 14, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The slider handle is not placed at the right position when it is scaled.
Step to reproduce : Place the slider inside a scaled div
const wrapperStyle = { width: 400, margin: 50,transform:scale(0.5) };
ReactDOM.render(
Slider with custom handle
Range with custom handle
`${value}%`} />I changed line 211 in lib/common/CreateSlider.js and it works for me :
Prev : return this.props.vertical ? slider.clientHeight : slider.clientWidth;
Now : return this.props.vertical ? slider.getBoundingClientRect().height : slider.getBoundingClientRect().width;
The text was updated successfully, but these errors were encountered: