You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the only situation where this behavior makes sense is when an item defines a onMouseDrag() event. Then I would expect to receive the onMouseUp() wether it is inside or outside of the item (this is also the case why it was implemented it in such a way). This can be easily fixed.
Check out the following example. Click one circle, then drag and release on top of the other circle:
http://sketch.paperjs.org/#S/pZBNC4JAEIb/yrAXFUSs6GJ08hwE0Sk9rOuEi9usrKsdov/eiNY5cA7DfPG+D/MSJB8oMnFp0atGxELZeupH6aCTvoEjED7hzGWSa6cMhq+CgEMheXQZ3DZpGgOnMp4XTtZ66DPYp8vgro3JrbF8HFRGqjYo6B0dCiposkgsnezQ47Vjs/tAymtLIY6sH8Fi5hvdJz8dvgsc1sG0YalJ6Mu7/QN4twJ4Rt6uZuZPVw5l21lNvhfZrXx/AA==
The circle you released the mouse on top of will turn red, as specified in Path.onMouseUp()
Now, try the exact same example but with Path.onMouseDown() included:
http://sketch.paperjs.org/#S/zZI9C8IwEIb/ypGlCqVUxaXiVFdBECfrENPThsZLSdN2EP+7V/xAnBQXMxy5D56X97izIHlCkYh1iV4VIhTK5n3eSgeV9AXMgbCDFX+jVDtlcHDOCPgpJI8uge0ojkPgsAtvDSdz3dQJTON74aCNSa2xPBzsjVRlkNFlOMsoo14isrS0TY0L2xHLHRpSXlsaYMsKQ7jL+ULX0ZPEc8HRIVLQ9xj3DttU36Ac5q+gh/nxB+4n/+L+hhv/vAC+gb1DWVZWk69Fst1drg==
The behavior changes: onMouseUp fires for both circles.
Curious if this is intended behavior or not. I'm guessing not, it seems to break what the API specifies.
The text was updated successfully, but these errors were encountered: