Replies: 2 comments 4 replies
-
Hi @jekelija did you try using the event 'mouse:down:before' there? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I did that, and the following problem occurred
I could try also setting this._target in that callback, but its private. Want me to test if that works and then i can do a PR for adding a setter for the target? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I have a use case where I have a FabricObject that when selected, it should auto multi-select another FabricObject with it.
I have this working by updating the active object on selection:created/selection:updated.
However, it prevents moving the objects on first click. I have to click the object, which auto multi-selects the other object, and then click again to drag. This is because of this code in __onMouseDown:
this.setActiveObject fires the notification where i update the active object.
Which means that ( if (target === this._activeObject) fails and i cannot drag the object.
Since target is a local variable, I cannot find any way to change it, so I assume I probably need to find another way to trigger auto-selection of the 2nd object when the first item is clicked?
Open to any suggestions that work on either v5 or v6.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions