diff --git a/dist/all.js b/dist/all.js index fefc7ff..9f3bdaa 100644 --- a/dist/all.js +++ b/dist/all.js @@ -16313,7 +16313,7 @@ window.methodDraw = function() { }; // called when we've selected a different element - var selectedChanged = function(window,elems) { + var selectedChanged = function(window,elems) { var mode = svgCanvas.getMode(); if(mode === "select") setSelectMode(); if (mode === "pathedit") return updateContextPanel(); @@ -16339,6 +16339,11 @@ window.methodDraw = function() { $('#canvas_panel').show() $('#tools_top').removeClass('multiselected') } + + // We need to update the context panel always when we've selected a different element. Otherwise some + // menu items are disabled even if they shouldn't be (e.g. group multiple elements) + updateContextPanel(); + svgCanvas.runExtensions("selectedChanged", { elems: elems, selectedElement: selectedElement, @@ -16850,7 +16855,7 @@ window.methodDraw = function() { } if (!elem) { - menu_items.disableContextMenuItems('#delete,#cut,#copy,#group,#ungroup,#move_front,#move_up,#move_down,#move_back'); + menu_items.disableContextMenuItems('#delete,#cut,#copy,#ungroup,#move_front,#move_up,#move_down,#move_back'); } // update history buttons @@ -18856,6 +18861,7 @@ window.methodDraw = function() { // Run init once DOM is loaded $(methodDraw.init); + function Palette(){ var palette = [ "#444444", "#482816", "#422C10", "#3B2F0E", "#32320F", diff --git a/dist/index.html b/dist/index.html index 9974c5f..aa463c3 100644 --- a/dist/index.html +++ b/dist/index.html @@ -433,12 +433,36 @@

.

-
-
-
-
-
-
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
@@ -631,9 +655,7 @@
- - diff --git a/src/index.html b/src/index.html index 3a28416..36f566f 100644 --- a/src/index.html +++ b/src/index.html @@ -447,12 +447,36 @@

.

-
-
-
-
-
-
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
diff --git a/src/js/method-draw.js b/src/js/method-draw.js index 61f28a8..5a14522 100644 --- a/src/js/method-draw.js +++ b/src/js/method-draw.js @@ -141,7 +141,7 @@ window.methodDraw = function() { }; // called when we've selected a different element - var selectedChanged = function(window,elems) { + var selectedChanged = function(window,elems) { var mode = svgCanvas.getMode(); if(mode === "select") setSelectMode(); if (mode === "pathedit") return updateContextPanel(); @@ -167,6 +167,11 @@ window.methodDraw = function() { $('#canvas_panel').show() $('#tools_top').removeClass('multiselected') } + + // We need to update the context panel always when we've selected a different element. Otherwise some + // menu items are disabled even if they shouldn't be (e.g. group multiple elements) + updateContextPanel(); + svgCanvas.runExtensions("selectedChanged", { elems: elems, selectedElement: selectedElement, @@ -678,7 +683,7 @@ window.methodDraw = function() { } if (!elem) { - menu_items.disableContextMenuItems('#delete,#cut,#copy,#group,#ungroup,#move_front,#move_up,#move_down,#move_back'); + menu_items.disableContextMenuItems('#delete,#cut,#copy,#ungroup,#move_front,#move_up,#move_down,#move_back'); } // update history buttons @@ -2683,4 +2688,4 @@ window.methodDraw = function() { }(jQuery); // Run init once DOM is loaded -$(methodDraw.init); \ No newline at end of file +$(methodDraw.init);