Browse Source

Changed to snapping for standard movement. Also added smooth setting for previous behavior.

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

8
src/definitions/modules/range.js

@ -287,7 +287,10 @@ $.fn.range = function(parameters) {
newPos = module.determine.pos(eventPos)
;
if (eventPos >= module.get.trackOffset() && eventPos <= module.get.trackOffset() + module.get.trackLength()) {
module.set.position(newPos);
if(module.get.step() == 0 || settings.smooth)
module.set.position(newPos);
else
module.set.value(module.determine.value(newPos));
}
},
up: function(event, originalEvent) {
@ -992,6 +995,7 @@ $.fn.range.settings = {
start : 0,
doubleStart : 1,
labelType : 'number',
smooth : false,
//the decimal place to round to if step is undefined
decimalPlaces : 2,
@ -1023,7 +1027,7 @@ $.fn.range.settings = {
},
onChange : function(value){},
onMove : function(value){},
};

Loading…
Cancel
Save