Fixed issue 692 by applying adrianbjones' patch and making some adjustments
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1752 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
d826136331
commit
e2401669ad
|
@ -686,6 +686,8 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
|
|||
<li><a href="#paste">Paste</a></li>
|
||||
<li><a href="#paste_in_place">Paste in Place</a></li>
|
||||
<li class="separator"><a href="#delete">Delete</a></li>
|
||||
<li class="separator"><a href="#group">Group</a></li>
|
||||
<li><a href="#ungroup">Ungroup</a></li>
|
||||
<li class="separator"><a href="#move_up">Bring Forward</a></li>
|
||||
<li><a href="#move_down">Send Backward</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1406,6 +1406,7 @@
|
|||
return;
|
||||
}
|
||||
var is_node = currentMode == 'pathedit'; //elem ? (elem.id && elem.id.indexOf('pathpointgrip') == 0) : false;
|
||||
var menu_items = $('#cmenu_canvas li');
|
||||
$('#selected_panel, #multiselected_panel, #g_panel, #rect_panel, #circle_panel,\
|
||||
#ellipse_panel, #line_panel, #text_panel, #image_panel, #container_panel, #use_panel').hide();
|
||||
if (elem != null) {
|
||||
|
@ -1541,7 +1542,7 @@
|
|||
else if(el_name == 'image') {
|
||||
setImageURL(svgCanvas.getHref(elem));
|
||||
} // image
|
||||
else if(el_name == 'g' || el_name == 'use') {
|
||||
else if(el_name === 'g' || el_name === 'use') {
|
||||
$('#container_panel').show();
|
||||
var title = svgCanvas.getTitle();
|
||||
var label = $('#g_title')[0];
|
||||
|
@ -1553,13 +1554,20 @@
|
|||
} else {
|
||||
label.removeAttribute(d);
|
||||
}
|
||||
if(el_name === 'g') {
|
||||
menu_items.enableContextMenuItems('#ungroup');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // if (elem != null)
|
||||
else if (multiselected) {
|
||||
$('#multiselected_panel').show();
|
||||
menu_items
|
||||
.enableContextMenuItems('#group')
|
||||
.disableContextMenuItems('#ungroup');
|
||||
} else {
|
||||
$('#cmenu_canvas li').disableContextMenuItems('#delete,#cut,#copy,#move_up,#move_down');
|
||||
menu_items.disableContextMenuItems('#delete,#cut,#copy,#group,#ungroup,#move_up,#move_down');
|
||||
}
|
||||
|
||||
// update history buttons
|
||||
|
@ -3886,6 +3894,12 @@
|
|||
case 'paste_in_place':
|
||||
svgCanvas.pasteElements('in_place');
|
||||
break;
|
||||
case 'group':
|
||||
svgCanvas.groupSelectedElements();
|
||||
break;
|
||||
case 'ungroup':
|
||||
svgCanvas.ungroupSelectedElement();
|
||||
break;
|
||||
case 'move_down':
|
||||
moveUpDownSelected('Down');
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue