File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,15 +125,19 @@ var Shape = Item.extend(/** @lends Shape# */{
125125 return false ;
126126 } ,
127127
128- // DOCS: #toPath()
129- toPath : function ( ) {
128+ // DOCS: #toPath([insert=true] )
129+ toPath : function ( insert ) {
130130 var path = new Path [ Base . capitalize ( this . _shape ) ] ( {
131131 center : new Point ( ) ,
132132 size : this . _size ,
133- radius : this . _radius
133+ radius : this . _radius ,
134+ insert : false
134135 } ) ;
135136 path . transform ( this . _matrix ) ;
136137 path . setStyle ( this . _style ) ;
138+ // Insert is true by default.
139+ if ( insert || insert === undefined )
140+ path . insertAbove ( this ) ;
137141 return path ;
138142 } ,
139143
Original file line number Diff line number Diff line change @@ -1611,9 +1611,6 @@ var Path = PathItem.extend(/** @lends Path# */{
16111611 if ( ! this . _closed )
16121612 return null ;
16131613
1614- if ( insert === undefined )
1615- insert = true ;
1616-
16171614 var segments = this . _segments ,
16181615 type ,
16191616 size ,
@@ -1674,11 +1671,14 @@ var Path = PathItem.extend(/** @lends Path# */{
16741671 center : center ,
16751672 size : size ,
16761673 radius : radius ,
1677- insert : insert
1674+ insert : false
16781675 } ) ;
16791676 // Determine and apply the shape's angle of rotation.
16801677 shape . rotate ( topCenter . subtract ( center ) . getAngle ( ) + 90 ) ;
16811678 shape . setStyle ( this . _style ) ;
1679+ // Insert is true by default.
1680+ if ( insert || insert === undefined )
1681+ shape . insertAbove ( this ) ;
16821682 return shape ;
16831683 }
16841684 return null ;
You can’t perform that action at this time.
0 commit comments