mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Fix CompoundPath#insertChild.
It was not returning success values and thus broke some tests.
This commit is contained in:
parent
8dbd2c25bf
commit
adb2ddc615
1 changed files with 3 additions and 2 deletions
|
@ -53,13 +53,14 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath#
|
||||||
},
|
},
|
||||||
|
|
||||||
insertChild: function(index, item) {
|
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
|
// All children except for the bottom one (first one in list) are set
|
||||||
// to anti-clockwise orientation, so that they appear as holes, but
|
// to anti-clockwise orientation, so that they appear as holes, but
|
||||||
// only if their orientation was not already specified before
|
// only if their orientation was not already specified before
|
||||||
// (= _clockwise is defined).
|
// (= _clockwise is defined).
|
||||||
if (item._clockwise === undefined)
|
if (res && item._clockwise === undefined)
|
||||||
item.setClockwise(item._index == 0);
|
item.setClockwise(item._index == 0);
|
||||||
|
return res;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue