mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-01 08:38:54 -04:00
Implement hit-test options: center and bounds.
This commit is contained in:
parent
c033a5a7bc
commit
62ba983432
3 changed files with 30 additions and 5 deletions
src/project
|
@ -187,8 +187,7 @@ var Project = this.Project = Base.extend(/** @lends Project# */{
|
|||
// 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);
|
||||
if (res)
|
||||
return res;
|
||||
if (res) return res;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue