Ox.Range: properly disable track
This commit is contained in:
parent
719cfeac13
commit
dcbee18584
1 changed files with 9 additions and 0 deletions
|
@ -175,6 +175,9 @@ Ox.Range = function(options, self) {
|
|||
|
||||
function clickTrack(data) {
|
||||
// fixme: thumb ends up a bit too far on the right
|
||||
if (self.options.disabled) {
|
||||
return;
|
||||
}
|
||||
var isThumb = $(data.target).hasClass('OxThumb');
|
||||
self.drag = {
|
||||
left: self.$track.offset().left,
|
||||
|
@ -184,6 +187,9 @@ Ox.Range = function(options, self) {
|
|||
}
|
||||
|
||||
function dragTrack(data) {
|
||||
if (self.options.disabled) {
|
||||
return;
|
||||
}
|
||||
setValue(
|
||||
getValue(data.clientX - self.drag.left - self.drag.offset),
|
||||
false,
|
||||
|
@ -192,6 +198,9 @@ Ox.Range = function(options, self) {
|
|||
}
|
||||
|
||||
function dragendTrack(data) {
|
||||
if (self.options.disabled) {
|
||||
return;
|
||||
}
|
||||
self.options.value = void 0;
|
||||
setValue(getValue(data.clientX - self.drag.left - self.drag.offset), false, true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue