-
-
Notifications
You must be signed in to change notification settings - Fork 733
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
Cancel drop #610
Comments
I worked around this by making the background area around the droppable area also a canvas, but with rule: canMoveIn => false. It works but I think there should be a better way. |
I found you can customise the events https://craft.js.org/docs/api/editor#override-default-event-handlers I tried using If the indicator is false, the drop is canceled - however, this comes directly from the positioner and not from the editor store. |
Is your feature request related to a problem? Please describe.
When a user moves their mouse outside of the canvas, the last "touched" point in the canvas is where the element will drop when the mouse is released, even if the mouse is outside the canvas. There are times when a user changes their mind re dragging. It would be intuitive, IMO, to have the drag cancel when the mouse is outside of the canvas, especially, if the drag is to create a new element, and then the user moves the element "back" into the toolbox. It will still drop into the last touched place on the canvas
Describe the solution you'd like
A way to cancel the drag action if over a certain area, or outside the canvas
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: