mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-07-06 17:44:28 -06:00
fixes recover after destroy
This commit is contained in:
parent
fc1d5a3b27
commit
6d241f7204
@ -99,12 +99,13 @@
|
|||||||
_color.setColor(extractValue(_$trigger[0]));
|
_color.setColor(extractValue(_$trigger[0]));
|
||||||
|
|
||||||
preRender(true);
|
preRender(true);
|
||||||
});
|
}).on(_pointerdown,
|
||||||
|
'.cp-xy-slider,.cp-z-slider,.cp-alpha', pointerdown);
|
||||||
} else {
|
} else {
|
||||||
$(_$UI).hide(_options.animationSpeed, function() {
|
$(_$UI).hide(_options.animationSpeed, function() {
|
||||||
preRender(false);
|
preRender(false);
|
||||||
_colorPicker.$trigger = null;
|
_colorPicker.$trigger = null;
|
||||||
});
|
}).off('.a');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,9 +131,7 @@
|
|||||||
);
|
);
|
||||||
this._width = this.offsetWidth;
|
this._width = this.offsetWidth;
|
||||||
this._height = this.offsetHeight;
|
this._height = this.offsetHeight;
|
||||||
}).hide().
|
}).hide();
|
||||||
on(_pointerdown,
|
|
||||||
'.cp-xy-slider,.cp-z-slider,.cp-alpha', pointerdown);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pointerdown(e) {
|
function pointerdown(e) {
|
||||||
@ -322,7 +321,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$.fn.colorPicker.destroy = function() {
|
$.fn.colorPicker.destroy = function() {
|
||||||
_instance.add(_colorPicker.$UI).add(_options.body).off('.a'); // saver
|
_instance.add(_options.body).off('.a'); // saver
|
||||||
_colorPicker.toggle(false);
|
_colorPicker.toggle(false);
|
||||||
_instance = null;
|
_instance = null;
|
||||||
};
|
};
|
||||||
|
File diff suppressed because one or more lines are too long
2
jqColorPicker.min.js
vendored
2
jqColorPicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user