disable color palette when interface is not editable

pull/1/head
ansuz 7 years ago
parent 8359902f6a
commit 6157c57a4b

@ -208,6 +208,7 @@ define([
}); });
var setEditable = function (bool) { var setEditable = function (bool) {
APP.editable = bool;
if (readOnly && bool) { return; } if (readOnly && bool) { return; }
if (bool) { $controls.css('display', 'flex'); } if (bool) { $controls.css('display', 'flex'); }
else { $controls.hide(); } else { $controls.hide(); }
@ -287,6 +288,7 @@ define([
}) })
.on('dblclick', function (e) { .on('dblclick', function (e) {
e.preventDefault(); e.preventDefault();
if (!APP.editable) { return; }
pickColor(Colors.rgb2hex($color.css('background-color')), function (c) { pickColor(Colors.rgb2hex($color.css('background-color')), function (c) {
$color.css({ $color.css({
'background-color': c, 'background-color': c,

Loading…
Cancel
Save