Fix Issue 87 via Alexis' patch: remove poly artifacts when switching mode in mid-creation of poly
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@378 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
d653745a70
commit
66e69f45f4
|
@ -1331,6 +1331,7 @@ function SvgCanvas(c)
|
|||
while(i--) {
|
||||
document.getElementById("polypointgrip_"+i).setAttribute("display", "none");
|
||||
}
|
||||
document.getElementById("poly_stretch_line").setAttribute("display", "none");
|
||||
};
|
||||
|
||||
var addAllPointGripsToPoly = function() {
|
||||
|
@ -1625,7 +1626,6 @@ function SvgCanvas(c)
|
|||
}
|
||||
|
||||
removeAllPointGripsFromPoly();
|
||||
document.getElementById("poly_stretch_line").setAttribute("display", "none");
|
||||
|
||||
// this will signal to commit the poly
|
||||
element = poly;
|
||||
|
@ -1771,7 +1771,11 @@ function SvgCanvas(c)
|
|||
this.setMode = function(name) {
|
||||
// toss out half-drawn poly
|
||||
if (current_mode == "poly" && current_poly_pts.length > 0) {
|
||||
element.parentNode.removeChild(svgdoc.getElementById(getId()));
|
||||
var elem = svgdoc.getElementById(getId());
|
||||
elem.parentNode.removeChild(elem);
|
||||
removeAllPointGripsFromPoly();
|
||||
canvas.clearSelection();
|
||||
started = false;
|
||||
current_poly = null;
|
||||
current_poly_pts = [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue