From 6157c57a4be24e4fecc66839bd843837202d8966 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 24 Oct 2017 17:59:19 +0200 Subject: [PATCH] disable color palette when interface is not editable --- www/whiteboard/inner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/whiteboard/inner.js b/www/whiteboard/inner.js index f5ccd22b9..e71b7fe69 100644 --- a/www/whiteboard/inner.js +++ b/www/whiteboard/inner.js @@ -208,6 +208,7 @@ define([ }); var setEditable = function (bool) { + APP.editable = bool; if (readOnly && bool) { return; } if (bool) { $controls.css('display', 'flex'); } else { $controls.hide(); } @@ -287,6 +288,7 @@ define([ }) .on('dblclick', function (e) { e.preventDefault(); + if (!APP.editable) { return; } pickColor(Colors.rgb2hex($color.css('background-color')), function (c) { $color.css({ 'background-color': c,