mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-01 16:49:15 -04:00
parent
450c8fc1df
commit
906faf7956
4 changed files with 10 additions and 9 deletions
src/project
|
@ -223,8 +223,10 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
* hit.
|
||||
*/
|
||||
hitTest: function(point, options) {
|
||||
options = HitResult.getOptions(point, options);
|
||||
point = options.point;
|
||||
// We don't need to do this here, but it speeds up things since we won't
|
||||
// repeatetly convert in Item#hitTest() then.
|
||||
point = Point.read(arguments);
|
||||
options = HitResult.getOptions(Base.readValue(arguments));
|
||||
// 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