mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -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' },
|
_boundsType: { bounds: 'strokeBounds' },
|
||||||
|
|
||||||
_hitTest: function(point, options, matrix) {
|
_hitTest: function(point, options, matrix) {
|
||||||
point = point.transform(this.matrix);
|
var hitResult = this._symbol._definition.hitTest(
|
||||||
var hitResult = this._symbol._definition.hitTest(point, options, matrix);
|
point._transformPoint(this.matrix), options, matrix);
|
||||||
// TODO: When the symbol's definition is a path, should hitResult contain
|
// TODO: When the symbol's definition is a path, should hitResult contain
|
||||||
// information like HitResult#curve?
|
// information like HitResult#curve?
|
||||||
if (hitResult)
|
if (hitResult)
|
||||||
|
|
Loading…
Reference in a new issue