mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Optimize PlacedSymbol#_hitTest a bit.
Use faster Point#_transformPoint function to transform point.
This commit is contained in:
parent
e835ccf786
commit
43b3ac6beb
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ var PlacedItem = this.PlacedItem = Item.extend(/** @lends PlacedItem# */{
|
|||
_boundsType: { bounds: 'strokeBounds' },
|
||||
|
||||
_hitTest: function(point, options, matrix) {
|
||||
point = point.transform(this.matrix);
|
||||
var hitResult = this._symbol._definition.hitTest(point, options, matrix);
|
||||
var hitResult = this._symbol._definition.hitTest(
|
||||
point._transformPoint(this.matrix), options, matrix);
|
||||
// TODO: When the symbol's definition is a path, should hitResult contain
|
||||
// information like HitResult#curve?
|
||||
if (hitResult)
|
||||
|
|
Loading…
Reference in a new issue