Fixed issue 575 and issue 577 on trunk
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1599 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
58639c2ea2
commit
e953bd9c78
|
@ -406,7 +406,18 @@ svgEditor.addExtension("Connector", function(S) {
|
||||||
if(svgCanvas.getMode() == "connector") {
|
if(svgCanvas.getMode() == "connector") {
|
||||||
var fo = $(mouse_target).closest("foreignObject");
|
var fo = $(mouse_target).closest("foreignObject");
|
||||||
if(fo.length) mouse_target = fo[0];
|
if(fo.length) mouse_target = fo[0];
|
||||||
if(mouse_target.parentNode.parentNode != svgcontent) {
|
|
||||||
|
var parents = $(mouse_target).parents();
|
||||||
|
|
||||||
|
if(mouse_target == start_elem) {
|
||||||
|
// Start line through click
|
||||||
|
started = true;
|
||||||
|
return {
|
||||||
|
keep: true,
|
||||||
|
element: null,
|
||||||
|
started: started
|
||||||
|
}
|
||||||
|
} else if($.inArray(svgcontent, parents) === -1) {
|
||||||
// Not a valid target element, so remove line
|
// Not a valid target element, so remove line
|
||||||
$(cur_line).remove();
|
$(cur_line).remove();
|
||||||
started = false;
|
started = false;
|
||||||
|
@ -415,14 +426,6 @@ svgEditor.addExtension("Connector", function(S) {
|
||||||
element: null,
|
element: null,
|
||||||
started: started
|
started: started
|
||||||
}
|
}
|
||||||
} else if(mouse_target == start_elem) {
|
|
||||||
// Start line through click
|
|
||||||
started = true;
|
|
||||||
return {
|
|
||||||
keep: true,
|
|
||||||
element: null,
|
|
||||||
started: started
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Valid end element
|
// Valid end element
|
||||||
end_elem = mouse_target;
|
end_elem = mouse_target;
|
||||||
|
|
|
@ -279,6 +279,12 @@ function ChangeElementCommand(elem, attrs, text) {
|
||||||
if (this.elem.tagName == "title" && this.elem.parentNode.parentNode == svgcontent) {
|
if (this.elem.tagName == "title" && this.elem.parentNode.parentNode == svgcontent) {
|
||||||
identifyLayers();
|
identifyLayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove transformlist to prevent confusion that causes bugs like 575.
|
||||||
|
if (svgTransformLists[this.elem.id]) {
|
||||||
|
delete svgTransformLists[this.elem.id];
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5663,6 +5669,7 @@ function BatchCommand(text) {
|
||||||
batchCmd.addSubCommand(new ChangeElementCommand(elem, changes));
|
batchCmd.addSubCommand(new ChangeElementCommand(elem, changes));
|
||||||
canvas.clearSelection();
|
canvas.clearSelection();
|
||||||
this.resetOrientation(elem);
|
this.resetOrientation(elem);
|
||||||
|
|
||||||
addCommandToHistory(batchCmd);
|
addCommandToHistory(batchCmd);
|
||||||
|
|
||||||
// Set matrix to null
|
// Set matrix to null
|
||||||
|
|
Loading…
Reference in New Issue