Finish Issue 40: grouping

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@633 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-09-13 15:50:43 +00:00
parent 8019c343ec
commit 05253d1366
1 changed files with 9 additions and 7 deletions

View File

@ -300,7 +300,7 @@ function BatchCommand(text) {
this.rotateGrip.setAttribute("display", bShow); this.rotateGrip.setAttribute("display", bShow);
this.rotateGripConnector.setAttribute("display", bShow); this.rotateGripConnector.setAttribute("display", bShow);
var elem = this.selectedElement; var elem = this.selectedElement;
if(elem && elem.tagName == "text") bShow = "none"; if(elem && (elem.tagName == "text" || elem.tagName == "g")) bShow = "none";
for (dir in this.selectorGrips) { for (dir in this.selectorGrips) {
this.selectorGrips[dir].setAttribute("display", bShow); this.selectorGrips[dir].setAttribute("display", bShow);
} }
@ -2028,12 +2028,14 @@ function BatchCommand(text) {
if (selectedElements[1] == null) { if (selectedElements[1] == null) {
// set our current stroke/fill properties to the element's // set our current stroke/fill properties to the element's
var selected = selectedElements[0]; var selected = selectedElements[0];
cur_shape.fill = selected.getAttribute("fill"); if (selected.tagName != "g") {
cur_shape.fill_opacity = selected.getAttribute("fill-opacity"); cur_shape.fill = selected.getAttribute("fill");
cur_shape.stroke = selected.getAttribute("stroke"); cur_shape.fill_opacity = selected.getAttribute("fill-opacity");
cur_shape.stroke_opacity = selected.getAttribute("stroke-opacity"); cur_shape.stroke = selected.getAttribute("stroke");
cur_shape.stroke_width = selected.getAttribute("stroke-width"); cur_shape.stroke_opacity = selected.getAttribute("stroke-opacity");
cur_shape.stroke_style = selected.getAttribute("stroke-dasharray"); cur_shape.stroke_width = selected.getAttribute("stroke-width");
cur_shape.stroke_style = selected.getAttribute("stroke-dasharray");
}
if (selected.tagName == "text") { if (selected.tagName == "text") {
cur_text.font_size = selected.getAttribute("font-size"); cur_text.font_size = selected.getAttribute("font-size");
cur_text.font_family = selected.getAttribute("font-family"); cur_text.font_family = selected.getAttribute("font-family");