Rename CompoundPath#simplify() to #flatten() to avoid clashes with Path#simplify(), and add Path#flatten(), returning itself.

This commit is contained in:
Jürg Lehni 2012-11-06 10:16:03 -08:00
parent 93447ee533
commit fd8fe9c08e
3 changed files with 11 additions and 3 deletions

View file

@ -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);