Merge pull request #90 from tdittmann/enable-group-of-multiple-elements
Allow group of multiple different elementsmaster
commit
9f07745814
|
@ -141,7 +141,7 @@ window.methodDraw = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
// called when we've selected a different element
|
// called when we've selected a different element
|
||||||
var selectedChanged = function(window,elems) {
|
var selectedChanged = function(window,elems) {
|
||||||
var mode = svgCanvas.getMode();
|
var mode = svgCanvas.getMode();
|
||||||
if(mode === "select") setSelectMode();
|
if(mode === "select") setSelectMode();
|
||||||
if (mode === "pathedit") return updateContextPanel();
|
if (mode === "pathedit") return updateContextPanel();
|
||||||
|
@ -167,6 +167,11 @@ window.methodDraw = function() {
|
||||||
$('#canvas_panel').show()
|
$('#canvas_panel').show()
|
||||||
$('#tools_top').removeClass('multiselected')
|
$('#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", {
|
svgCanvas.runExtensions("selectedChanged", {
|
||||||
elems: elems,
|
elems: elems,
|
||||||
selectedElement: selectedElement,
|
selectedElement: selectedElement,
|
||||||
|
@ -678,7 +683,7 @@ window.methodDraw = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!elem) {
|
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
|
// update history buttons
|
||||||
|
@ -2683,4 +2688,4 @@ window.methodDraw = function() {
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
|
|
||||||
// Run init once DOM is loaded
|
// Run init once DOM is loaded
|
||||||
$(methodDraw.init);
|
$(methodDraw.init);
|
||||||
|
|
Loading…
Reference in New Issue