File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,8 +139,22 @@ define(function(require) {
139139 ctx . beginPath ( ) ;
140140 shape . buildPath ( ctx , shape . style ) ;
141141 ctx . closePath ( ) ;
142- if ( ctx . isPointInPath ( x , y ) ) {
143- return true ;
142+ shape . brushType = shape . brushTypeOnly || shape . brushType ;
143+ if (
144+ shape . style . brushType === 'fill'
145+ || shape . style . brushType === 'both'
146+ ) {
147+ if ( ctx . isPointInPath ( x , y ) ) {
148+ return true ;
149+ }
150+ }
151+ else if (
152+ shape . style . brushType === 'stroke'
153+ || shape . style . brushType === 'both' ) {
154+ ctx . lineWidth = shape . style . lineWidth ;
155+ if ( ctx . isPointInStroke ( x , y ) ) {
156+ return true ;
157+ }
144158 }
145159 }
146160 }
@@ -199,7 +213,7 @@ define(function(require) {
199213 }
200214 }
201215
202- addBenck ( 'mathMethod' , 'Math method' ) ;
216+ // addBenck('mathMethod', 'Math method');
203217 addBenck ( 'buildPath' , 'Native isPointInPath' ) ;
204218 addBenck ( 'jsInsidePath' , 'JS isPointInPath' ) ;
205219 // addBenck('pixelMethod', 'pixelMethod');
You can’t perform that action at this time.
0 commit comments