Skip to content

Commit

Permalink
Fix #998 - Use 10x scaling factor to work around a rendering bug in S…
Browse files Browse the repository at this point in the history
…afari
  • Loading branch information
leongersen committed Jun 21, 2019
1 parent f08c088 commit 972e6c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/nouislider.core.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
width: 100%;
}
.@{noUi-css-prefix}-origin {
height: 1%;
width: 1%;
height: 10%;
width: 10%;
}

/* Offset direction
Expand Down
2 changes: 1 addition & 1 deletion src/nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,7 @@
// Convert the value to the slider stepping/range.
scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);

var translation = 100 * (transformDirection(to, 0) - scope_DirOffset);
var translation = 10 * (transformDirection(to, 0) - scope_DirOffset);
var translateRule = "translate(" + inRuleOrder(translation + "%", "0") + ")";

scope_Handles[handleNumber].style[options.transformRule] = translateRule;
Expand Down

3 comments on commit 972e6c7

@kosmosjamaa
Copy link

Choose a reason for hiding this comment

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

This might of broken the component on Chrome.

@leongersen
Copy link
Owner Author

Choose a reason for hiding this comment

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

@kosmosjamaa What do you mean?

@kosmosjamaa
Copy link

Choose a reason for hiding this comment

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

sorry i cant give more details at the moment, but calculations on horizontal axis at least were off around 300% with this commit. had to revert back to previous release, where its working fine.
chrome 75.0.3770.100, Windows 8.1

Please sign in to comment.