mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-07-03 08:04:30 -06:00
destroy method added
This commit is contained in:
parent
b17dab0958
commit
a6419924da
@ -57,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resolveEventType(event) {
|
function resolveEventType(event) {
|
||||||
event = event.originalEvent.touches ?
|
event = event.originalEvent && event.originalEvent.touches ?
|
||||||
event.originalEvent.touches[0] : event;
|
event.originalEvent.touches[0] : event;
|
||||||
|
|
||||||
return event.originalEvent ? event.originalEvent : event;
|
return event.originalEvent ? event.originalEvent : event;
|
||||||
@ -149,7 +149,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pointerup(e) {
|
function pointerup(e) {
|
||||||
$document.off(_pointermove).off(_pointerup);
|
$document.off('.a');
|
||||||
}
|
}
|
||||||
|
|
||||||
function xy_slider(event) {
|
function xy_slider(event) {
|
||||||
@ -281,7 +281,7 @@
|
|||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
!_colorPicker && options.scrollResize && $(window).
|
!_colorPicker && options.scrollResize && $(window).
|
||||||
on('resize scroll', function() {
|
on('resize.a scroll.a', function() {
|
||||||
if (_colorPicker.$trigger) {
|
if (_colorPicker.$trigger) {
|
||||||
_colorPicker.toggle.call(_colorPicker.$trigger[0], true);
|
_colorPicker.toggle.call(_colorPicker.$trigger[0], true);
|
||||||
}
|
}
|
||||||
@ -323,4 +323,12 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$.fn.colorPicker.destroy = function() {
|
||||||
|
$(_colorPicker.color.options.body).off('.a');
|
||||||
|
_colorPicker.toggle(false);
|
||||||
|
_instance = null;
|
||||||
|
_selector = '';
|
||||||
|
}
|
||||||
|
|
||||||
})(jQuery, Colors);
|
})(jQuery, Colors);
|
File diff suppressed because one or more lines are too long
6
jqColorPicker.min.js
vendored
6
jqColorPicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user