From 781cde51904fd0e03e971685d6e6afe54f39062a Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Tue, 1 Sep 2009 14:14:19 +0000 Subject: [PATCH] Fixed Issue 153: z-index of the clones is inverted when you clone several objects at once git-svn-id: http://svg-edit.googlecode.com/svn/trunk@518 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index cd862b2c..75c950b3 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -2900,8 +2900,8 @@ function SvgCanvas(c) this.cloneSelectedElements = function() { var batchCmd = new BatchCommand("Clone Elements"); var copiedElements = []; - var len = selectedElements.length; - for (var i = 0; i < len; ++i) { + var i = selectedElements.length; + while(i--) { var elem = selectedElements[i]; if (elem == null) break; copiedElements.push(elem.cloneNode(true));