mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-28 22:59:36 -04:00
Perform point conversion along with HitResult.getOptions().
This commit is contained in:
parent
cc00f40532
commit
9db96ae898
3 changed files with 8 additions and 3 deletions
src/project
|
@ -182,7 +182,8 @@ var Project = this.Project = Base.extend(/** @lends Project# */{
|
|||
},
|
||||
|
||||
hitTest: function(point, options) {
|
||||
options = HitResult.getOptions(options);
|
||||
options = HitResult.getOptions(point, options);
|
||||
point = options.point;
|
||||
// Loop backwards, so layers that get drawn last are tested first
|
||||
for (var i = this.layers.length - 1; i >= 0; i--) {
|
||||
var res = this.layers[i].hitTest(point, options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue