Skip to content

Conversation

atomiomi
Copy link
Contributor

@atomiomi atomiomi commented Mar 4, 2015

with step of 0.01 value did not reached max value

Fixes #11286

with step of 0.01 value did not reached max value

Fixes #11286
@@ -558,7 +558,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
var max = this.options.max,
min = this._valueMin(),
step = this.options.step,
aboveMin = Math.floor( ( max - min ) / step ) * step;
aboveMin = Math.floor( ( +( max - min ).toFixed(5) ) / step ) * step;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use arbitrary precision. See

_precision: function() {
.

in "_calculateNewMax" difference between max and min was fixed to 5 precision

Fixes #11286
@scottgonzalez
Copy link
Member

Merged with some style updates. Thanks.

scottgonzalez pushed a commit that referenced this pull request Mar 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants