Don't update the proxy onfinechange when picking a cursor color

pull/1/head
yflory 5 years ago
parent e2ff6c7c30
commit 521940f604

@ -1188,16 +1188,24 @@ define([
var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'});
// when jscolor picker value change
var onchange = function (colorL) {
var _onchange = function (colorL) {
var val = "#" + colorL.toString();
if (!/^#[0-9a-fA-F]{6}$/.test(val)) { return; }
$spinner.show();
$ok.hide();
common.setAttribute(['general', 'cursor', 'color'], val, function () {
$spinner.hide();
$ok.show();
});
};
var to;
var onchange = function (colorL) {
$spinner.show();
$ok.hide();
if (to) { clearTimeout(to); }
to = setTimeout(function () {
_onchange(colorL);
}, 300);
};
// jscolor picker
var jscolorL = new window.jscolor($colorPicker[0],{showOnClick: false, onFineChange: onchange, valueElement:undefined});

Loading…
Cancel
Save