From 3d3c1f4454082a00c9cb7f38f4e598b3559456f8 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 16 Nov 2009 19:17:18 +0000 Subject: [PATCH] Made Opera rotation less broken git-svn-id: http://svg-edit.googlecode.com/svn/trunk@949 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.css | 1 + editor/svgcanvas.js | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/editor/svg-editor.css b/editor/svg-editor.css index c805b656..d9904492 100644 --- a/editor/svg-editor.css +++ b/editor/svg-editor.css @@ -274,6 +274,7 @@ body { stroke-dasharray: none; opacity: 1; pointer-events: stroke; + vector-effect: non-scaling-stroke; } #workarea.wireframe #svgcontent text { diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 67acfb0c..f0fc3d5c 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1934,6 +1934,13 @@ function BatchCommand(text) { } } + if(showGrips) { + selectorManager.requestSelector(selectedElements[0]).showGrips(true); + } + else if (selectedElements.length > 1) { + selectorManager.requestSelector(selectedElements[0]).showGrips(false); + } + // make sure the elements are in the correct order // See: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition @@ -1943,13 +1950,9 @@ function BatchCommand(text) { } }); - - if(showGrips) { - selectorManager.requestSelector(selectedElements[0]).showGrips(true); - } - else if (selectedElements.length > 1) { - selectorManager.requestSelector(selectedElements[0]).showGrips(false); - } + // Make sure null value is at the end + if(!selectedElements[0]) selectedElements.push(selectedElements.shift()); + }; // TODO: could use slice here to make this faster?