From adb2ddc61544369db35ce50a4ce713e627e87ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 10 Oct 2012 19:54:32 -0700 Subject: [PATCH] Fix CompoundPath#insertChild. It was not returning success values and thus broke some tests. --- src/path/CompoundPath.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index 548d918f..80c0da73 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -53,13 +53,14 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath# }, insertChild: function(index, item) { - this.base(index, item); + var res = 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 (item._clockwise === undefined) + if (res && item._clockwise === undefined) item.setClockwise(item._index == 0); + return res; }, /**