Fixed issue 232 again
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1100 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
f1f3c31d21
commit
6d2f6e8270
|
@ -142,7 +142,8 @@ function ChangeElementCommand(elem, attrs, text) {
|
||||||
if (attr == "transform") { bChangedTransform = true; }
|
if (attr == "transform") { bChangedTransform = true; }
|
||||||
}
|
}
|
||||||
// relocate rotational transform, if necessary
|
// relocate rotational transform, if necessary
|
||||||
if(!bChangedTransform) {
|
if(!bChangedTransform && elem.tagName != 'svg') {
|
||||||
|
|
||||||
var angle = canvas.getRotationAngle(elem);
|
var angle = canvas.getRotationAngle(elem);
|
||||||
if (angle) {
|
if (angle) {
|
||||||
var bbox = elem.getBBox();
|
var bbox = elem.getBBox();
|
||||||
|
@ -5038,7 +5039,8 @@ function BatchCommand(text) {
|
||||||
dy.push(bbox.y*-1);
|
dy.push(bbox.y*-1);
|
||||||
});
|
});
|
||||||
|
|
||||||
canvas.moveSelectedElements(dx, dy, true);
|
var bCmd = canvas.moveSelectedElements(dx, dy, true);
|
||||||
|
batchCmd.addSubCommand(bCmd);
|
||||||
canvas.clearSelection();
|
canvas.clearSelection();
|
||||||
|
|
||||||
x = Math.round(bbox.width);
|
x = Math.round(bbox.width);
|
||||||
|
@ -5413,6 +5415,7 @@ function BatchCommand(text) {
|
||||||
var selected = elem || selectedElements[0];
|
var selected = elem || selectedElements[0];
|
||||||
// find the rotation transform (if any) and set it
|
// find the rotation transform (if any) and set it
|
||||||
var tlist = canvas.getTransformList(selected);
|
var tlist = canvas.getTransformList(selected);
|
||||||
|
if(!tlist) return 0; // <svg> elements have no tlist
|
||||||
var N = tlist.numberOfItems;
|
var N = tlist.numberOfItems;
|
||||||
for (var i = 0; i < N; ++i) {
|
for (var i = 0; i < N; ++i) {
|
||||||
var xform = tlist.getItem(i);
|
var xform = tlist.getItem(i);
|
||||||
|
@ -6067,6 +6070,7 @@ function BatchCommand(text) {
|
||||||
if (undoable)
|
if (undoable)
|
||||||
addCommandToHistory(batchCmd);
|
addCommandToHistory(batchCmd);
|
||||||
call("changed", selectedElements);
|
call("changed", selectedElements);
|
||||||
|
return batchCmd;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue