Browse Source

fixed custom step. Added in hover variation.

pull/4212/head
Gareth Daunton 8 years ago
parent
commit
c659ad30cf
3 changed files with 21 additions and 1 deletions
  1. 2
      src/definitions/modules/range.js
  2. 14
      src/definitions/modules/range.less
  3. 6
      src/themes/default/modules/range.variables

2
src/definitions/modules/range.js

@ -108,7 +108,7 @@ $.fn.range = function(parameters) {
var
ratio = (currentPos - startPos) / (endPos - startPos),
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
// (like 35 * .01 = 0.35000000000000003)

14
src/definitions/modules/range.less

@ -98,6 +98,20 @@
Variations
*******************************/
/*--------------
Hover
---------------*/
.ui.hover.range .inner .thumb {
opacity: @hoverVarOpacity;
transition: @hoverOpacityTransition;
}
.ui.hover.range .inner:hover .thumb {
opacity: @hoverVarHoverOpacity;
}
/*--------------
Inverted

6
src/themes/default/modules/range.variables

@ -49,6 +49,12 @@
Variations
--------------------*/
/* Hover */
@hoverVarOpacity : 0;
@hoverVarHoverOpacity : 1;
@hoverOpacityTransitionDuration : 0.2s;
@hoverOpacityTransition : opacity @hoverOpacityTransitionDuration linear;
/* Sizing */
@smallHeight : 1em;
@smallTrackHeight : 0.3em;

Loading…
Cancel
Save