mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Only change #clockwise on closed Paths when inserting into CompoundPaths.
This commit is contained in:
parent
c5ede2e955
commit
677ea374c5
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue