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

Selected elements get lost when using scroll bars #302

Closed
aurelio-pennacchio opened this issue Jul 11, 2022 · 2 comments
Closed

Selected elements get lost when using scroll bars #302

aurelio-pennacchio opened this issue Jul 11, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@aurelio-pennacchio
Copy link

I activated the GLSPProjectionView in the di-config.ts file using the following line of code
configureModelElement(context, DefaultTypes.GRAPH, GLSPGraph, GLSPProjectionView);
Now when I have an active selection of a node of the GGraph and then I use the scrollBars I lose the selection while I was expecting to mantain the previously selected elements.
Is it a configuration issue from my side or something else?

Thank you for all your work!

@spoenemann spoenemann added the bug Something isn't working label Aug 12, 2022
@dhuebner
Copy link
Contributor

dhuebner commented Feb 8, 2023

@aurelio-pennacchio
Thank you for reporting! I noticed that as well, it's really a bit annoying.

Is it a configuration issue from my side or something else?

It is not a configuration issue. From what I see in the codebase it is expected behavior. Viewport scroll bar elements are not a part of the sprotty root model, hence when clicking on them, Selection Listener handles selection on the next registered parent element (sprotty root).
We should fix this.

Possible solutions could be:

  • block propagation of mouse click events in viewport elements
  • distinguish between mouseDown and mouse start dragging (don't deselect on mouse start drag)
  • let SelectMouseListener be aware of viewport scrollbar components and handle respectively
  • in addition it would be nice to use scroll wheel + Ctrl (or Alt) to scroll and not Zoom Make it possible to scroll the viewport using alt+wheel #339

@dhuebner dhuebner self-assigned this Feb 8, 2023
dhuebner added a commit that referenced this issue Feb 8, 2023
dhuebner added a commit that referenced this issue Feb 9, 2023
Scroll the viewport using alt+wheel #339
dhuebner added a commit that referenced this issue Feb 13, 2023
Scroll the viewport using alt+wheel #339
@dhuebner
Copy link
Contributor

Fixed in master

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

No branches or pull requests

3 participants