Fixed Issue 646: No update of edge positions after shift+rotation on a path
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1808 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -5291,8 +5291,8 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
|
|||||||
// no change in position/size, so maybe we should move to pathedit
|
// no change in position/size, so maybe we should move to pathedit
|
||||||
else {
|
else {
|
||||||
var t = evt.target;
|
var t = evt.target;
|
||||||
if (selectedElements[0].nodeName == "path" && selectedElements[1] == null) {
|
if (selectedElements[0].nodeName === "path" && selectedElements[1] == null) {
|
||||||
pathActions.select(t);
|
pathActions.select(selectedElements[0]);
|
||||||
} // if it was a path
|
} // if it was a path
|
||||||
// else, if it was selected and this is a shift-click, remove it from selection
|
// else, if it was selected and this is a shift-click, remove it from selection
|
||||||
else if (evt.shiftKey) {
|
else if (evt.shiftKey) {
|
||||||
@@ -5505,7 +5505,7 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
|
|||||||
element.setAttribute("opacity", cur_shape.opacity);
|
element.setAttribute("opacity", cur_shape.opacity);
|
||||||
element.setAttribute("style", "pointer-events:inherit");
|
element.setAttribute("style", "pointer-events:inherit");
|
||||||
cleanupElement(element);
|
cleanupElement(element);
|
||||||
if(current_mode == "path") {
|
if(current_mode === "path") {
|
||||||
pathActions.toEditMode(element);
|
pathActions.toEditMode(element);
|
||||||
} else {
|
} else {
|
||||||
selectOnly([element], true);
|
selectOnly([element], true);
|
||||||
@@ -5529,13 +5529,14 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
|
|||||||
if(parent === current_group) return;
|
if(parent === current_group) return;
|
||||||
|
|
||||||
var mouse_target = getMouseTarget(evt);
|
var mouse_target = getMouseTarget(evt);
|
||||||
|
var tagName = mouse_target.tagName;
|
||||||
|
|
||||||
if(mouse_target.tagName === 'text' && current_mode !== 'textedit') {
|
if(tagName === 'text' && current_mode !== 'textedit') {
|
||||||
var pt = transformPoint( evt.pageX, evt.pageY, root_sctm );
|
var pt = transformPoint( evt.pageX, evt.pageY, root_sctm );
|
||||||
textActions.select(mouse_target, pt.x, pt.y);
|
textActions.select(mouse_target, pt.x, pt.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getRotationAngle(mouse_target)) {
|
if(tagName === "g" && getRotationAngle(mouse_target)) {
|
||||||
// TODO: Allow method of in-group editing without having to do
|
// TODO: Allow method of in-group editing without having to do
|
||||||
// this (similar to editing rotated paths)
|
// this (similar to editing rotated paths)
|
||||||
|
|
||||||
@@ -6502,6 +6503,9 @@ var pathActions = this.pathActions = function() {
|
|||||||
if(getRotationAngle(p.elem)) {
|
if(getRotationAngle(p.elem)) {
|
||||||
p.matrix = getMatrix(path.elem);
|
p.matrix = getMatrix(path.elem);
|
||||||
p.imatrix = p.matrix.inverse();
|
p.imatrix = p.matrix.inverse();
|
||||||
|
} else {
|
||||||
|
p.matrix = null;
|
||||||
|
p.imatrix = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.eachSeg(function(i) {
|
p.eachSeg(function(i) {
|
||||||
@@ -7309,7 +7313,7 @@ var pathActions = this.pathActions = function() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
select: function(target) {
|
select: function(target) {
|
||||||
if (current_path == target) {
|
if (current_path === target) {
|
||||||
pathActions.toEditMode(target);
|
pathActions.toEditMode(target);
|
||||||
current_mode = "pathedit";
|
current_mode = "pathedit";
|
||||||
} // going into pathedit mode
|
} // going into pathedit mode
|
||||||
|
|||||||
Reference in New Issue
Block a user