Skip to content
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

Move element out of window and then to a invalid location don't reset the move feedback #1426

Closed
ivy-lli opened this issue Nov 21, 2024 · 4 comments · Fixed by eclipse-glsp/glsp-client#399
Labels
bug Something isn't working

Comments

@ivy-lli
Copy link

ivy-lli commented Nov 21, 2024

If an element is dragged out of the window and then is placed on an invalid position, the MoveFeedback is not correctly reset.
But also only if you click on the invalid area (see workflow example where the last click is on the other element).

Strangely if the new position is valid then everything seems to work.

our glsp editor (no placement in the negative area):
Screen Recording 2024-11-21 at 13 01 32

glsp workflow example with enabled NoOverlapMovementRestrictor:
Screen Recording 2024-11-21 at 13 02 48

Honestly not sure how I can fix this. Maybe you have an idea here @martin-fleck-at?

@ivy-lli ivy-lli added the bug Something isn't working label Nov 21, 2024
@martin-fleck-at
Copy link
Contributor

From what I can see this is actually a feedback issue as another operation properly resets the element to the correct position. I can reproduce this by dragging the mouse outside the window, releasing the mouse button and then clicking on another element. When a selection occurs, we are stuck, is that the same behavior for you? If so, I can have a look at it, we probably just need to listen to the selection in the feedback listener and dispose the feedback.

@ivy-lli
Copy link
Author

ivy-lli commented Nov 22, 2024

I'm not 100% sure why this happens...
What I saw is that in the FeedbackMoveMouseListener (change-bounds-tool-move-feedback.ts) the initialMove (which is triggered by the mouseDown) can not find an moveable element and because of this stop the tracker.

martin-fleck-at added a commit to eclipse-glsp/glsp-client that referenced this issue Nov 22, 2024
- Handle mouse down if we should be dragging as mouse up
- Reset feedback if selection has changed
-- Ensure element does not have to be selected to revert move
-- Add method for listeners to selection service

Fixes eclipse-glsp/glsp#1426
@martin-fleck-at
Copy link
Contributor

@ivy-lli True, I can also see that being triggered sometimes. I tried a fix in eclipse-glsp/glsp-client#399, maybe you have some time to look at it and double check whether it also works for your use case.

@ivy-lli
Copy link
Author

ivy-lli commented Nov 25, 2024

Quickly checked our impl with the @eclipse-glsp/[email protected]. Seems to work. Thanks 👍
Screen Recording 2024-11-25 at 13 26 08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants