From 677ea374c5ee344c5981f8bdaff5a64d599b15f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 20 Jan 2013 15:48:06 -0800 Subject: [PATCH] Only change #clockwise on closed Paths when inserting into CompoundPaths. --- src/path/CompoundPath.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index f9462148..7c6e5dd4 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -54,14 +54,14 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath# // Only allow the insertion of paths if (item._type !== 'path') return null; - var res = this.base(index, item); + item = this.base(index, item); // All children except for the bottom one (first one in list) are set // to anti-clockwise orientation, so that they appear as holes, but // only if their orientation was not already specified before // (= _clockwise is defined). - if (!_cloning && res && item._clockwise === undefined) + if (!_cloning && item && item._closed && item._clockwise === undefined) item.setClockwise(item._index == 0); - return res; + return item; }, /**