mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-28 22:59:36 -04:00
Rename CompoundPath#simplify() to #flatten() to avoid clashes with Path#simplify(), and add Path#flatten(), returning itself.
This commit is contained in:
parent
93447ee533
commit
fd8fe9c08e
3 changed files with 11 additions and 3 deletions
src/path
|
@ -69,9 +69,9 @@ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath#
|
|||
* the path is moved outside and the compound path is erased.
|
||||
* Otherwise, the compound path is returned unmodified.
|
||||
*
|
||||
* @return {CompoundPath|Path} the simplified compound path
|
||||
* @return {CompoundPath|Path} the flattened compound path
|
||||
*/
|
||||
simplify: function() {
|
||||
flatten: function() {
|
||||
if (this._children.length == 1) {
|
||||
var child = this._children[0];
|
||||
child.insertAbove(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue