mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-13 06:29:11 -04:00
Prevent V8 "assignment to parameter in arguments object" deoptimizations.
Some getter-like functions still need fixing, but this might require a fix in Straps.js first.
This commit is contained in:
parent
3dbad9c477
commit
81651a7379
14 changed files with 139 additions and 133 deletions
src/project
|
@ -290,11 +290,11 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
* information about what exactly was hit or {@code null} if nothing was
|
||||
* hit
|
||||
*/
|
||||
hitTest: function(point, options) {
|
||||
hitTest: function(/* point, options */) {
|
||||
// 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.read(arguments));
|
||||
var point = Point.read(arguments),
|
||||
options = HitResult.getOptions(Base.read(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