Browse Source

fixed rounding issues. Also fixed some sizing issues.

pull/4212/head
Gareth Daunton 8 years ago
parent
commit
dc5c958cbb
2 changed files with 1 additions and 10 deletions
  1. 2
      src/definitions/modules/range.js
  2. 9
      src/definitions/modules/range.less

2
src/definitions/modules/range.js

@ -110,7 +110,7 @@ $.fn.range = function(parameters) {
var var
ratio = (currentPos - startPos) / (endPos - startPos), ratio = (currentPos - startPos) / (endPos - startPos),
range = settings.max - settings.min, range = settings.max - settings.min,
difference = Math.round(ratio * range / step) * step
difference = Math.round((ratio * range / step) * step)
; ;
// Use precision to avoid ugly Javascript floating point rounding issues // Use precision to avoid ugly Javascript floating point rounding issues
// (like 35 * .01 = 0.35000000000000003) // (like 35 * .01 = 0.35000000000000003)

9
src/definitions/modules/range.less

@ -456,9 +456,6 @@
---------------*/ ---------------*/
/* Small */ /* Small */
.ui.range.small {
height: @smallHeight;
}
.ui.range.small .inner .thumb { .ui.range.small .inner .thumb {
height: @smallHeight; height: @smallHeight;
width: @smallHeight; width: @smallHeight;
@ -470,9 +467,6 @@
} }
/* Large */ /* Large */
.ui.range.large {
height: @largeHeight;
}
.ui.range.large .inner .thumb { .ui.range.large .inner .thumb {
height: @largeHeight; height: @largeHeight;
width: @largeHeight; width: @largeHeight;
@ -484,9 +478,6 @@
} }
/* Big */ /* Big */
.ui.range.big {
height: @bigHeight;
}
.ui.range.big .inner .thumb { .ui.range.big .inner .thumb {
height: @bigHeight; height: @bigHeight;
width: @bigHeight; width: @bigHeight;

Loading…
Cancel
Save