From 3bb5c4219894a4fb2b9c8c274b49cea15adf1d1d Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Thu, 27 Aug 2009 04:43:05 +0000 Subject: [PATCH] Fix bug: rotated polyedit mode still had a problem git-svn-id: http://svg-edit.googlecode.com/svn/trunk@484 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index f42e931d..944b7bf1 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1643,7 +1643,7 @@ function SvgCanvas(c) var angle = canvas.getRotationAngle(current_poly) * Math.PI / 180.0; if (angle) { // extract the shape's (potentially) old 'center' from the transform attribute - var box = canvas.getBBox(current_poly); + var box = selectedBBoxes[0]; var cx = box.x + box.width/2, cy = box.y + box.height/2; var dx = x - cx, dy = y - cy; @@ -1851,6 +1851,8 @@ function SvgCanvas(c) current_poly_pts.push(cury); } // for each segment canvas.clearSelection(); + // save the poly's bbox + selectedBBoxes[0] = canvas.getBBox(current_poly); addAllPointGripsToPoly(); } // going into polyedit mode else {