From 9f3860e3e022784e66784133d7bad12c5f6a7435 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Tue, 30 Jun 2009 16:16:55 +0000 Subject: [PATCH] Add thin border to rubber-band box git-svn-id: http://svg-edit.googlecode.com/svn/trunk@238 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index f595c5f7..7cb9bb2c 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -311,6 +311,8 @@ function SvgCanvas(c) "id": "selectorRubberBand", "fill": "blue", "fill-opacity": 0.15, + "stroke": "blue", + "stroke-width": 0.5, "display": "none", "pointer-events": "none", } @@ -607,8 +609,15 @@ function SvgCanvas(c) } } - selectedElements[0] = newSelected; - selected = selectedElements[0]; + // find next slot in selectedElements array + var index = 0; + /* index = selectedElements.length; + for (var i = 0; i < selectedElements.length; ++i) { + if (selectedElements[i] == null) { index = i; break; } + } + */ + selectedElements[index] = newSelected; + selected = selectedElements[index]; if (selected != null) { selectedBBox = selected.getBBox();