-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onSelect called when the object is not selected. #5596
Comments
i think the doc needs to be updated. |
oh well i see your point. is called too much there. a bug. |
Okay, I understand now. Maybe we should move the calling of the onSelect after we determine whether the object is in the area of the selection? |
…the selected area (fabricjs#5596)
Created a PR that fixes this problem. #5632 |
…the selected area (fabricjs#5596)
…the selected area (fabricjs#5596)
Version
2.6.0
Test Case
http://jsfiddle.net/rpfilipe/rjx23sek/4/
Information about environment
Chrome, FIrefox
Steps to reproduce
Perform a selection by dragging the mouse that doesn't intersect the object.
Expected Behavior
onSelect() should not be called.
Actual Behavior
onSelect() is caled
Where's the problem
The onSelect() is called in the __collectObjects() method.
On the docs is stated that "This callback function is called every time _discardActiveObject or _setActiveObject try to to select this object".
Full Call Stack
__collectObjects() : fabric.js:12024
_groupSelectedObjects(): fabric.js:12015
_maybeGroupObjects(): fabric.js:12074
__onMouseUp(): fabric.js:11290
_onMouseUp(); fabric.js:11187
The text was updated successfully, but these errors were encountered: