From 97d9c8b76a715b365ccb1809f5d6aedd1f425d15 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Tue, 18 Aug 2009 16:59:01 +0000 Subject: [PATCH] Fixed part of issue 93 git-svn-id: http://svg-edit.googlecode.com/svn/trunk@408 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index e6f4c685..7b382cfa 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -728,14 +728,19 @@ function SvgCanvas(c) // This fixes Firefox 2- behavior - which does not reset values when the attribute has // been removed, see https://bugzilla.mozilla.org/show_bug.cgi?id=320622 var angle = canvas.getRotationAngle(selected); + var pointGripContainer = document.getElementById("polypointgrip_container"); if (angle) { var cx = remapx(box.x + box.width/2), cy = remapy(box.y + box.height/2); - selected.setAttribute("transform", ["rotate(", angle, " ", cx, ",", cy, ")"].join('')); + var rotate = ["rotate(", angle, " ", cx, ",", cy, ")"].join(''); + selected.setAttribute("transform", rotate); + pointGripContainer.setAttribute("transform", rotate); } else { selected.setAttribute("transform", ""); selected.removeAttribute("transform"); + pointGripContainer.setAttribute("transform", ""); + pointGripContainer.removeAttribute("transform"); } switch (selected.tagName) @@ -2130,6 +2135,11 @@ function SvgCanvas(c) this.changeSelectedAttribute("transform", "rotate(" + val + " " + (bbox.x+bbox.width/2) + "," + (bbox.y+bbox.height/2) + ")"); + var pointGripContainer = document.getElementById("polypointgrip_container"); + pointGripContainer.setAttribute("transform", "rotate(" + val + " " + + (bbox.x+bbox.width/2) + "," + + (bbox.y+bbox.height/2) + ")"); + }; this.each = function(cb) {