feenkcom / gtoolkit

Glamorous Toolkit is the Moldable Development environment. It empowers you to make systems explainable through experiences tailored for each problem.
https://gtoolkit.com
MIT License
1.06k stars 46 forks source link

Make the Mondrian zooming only work when the primary modifier is held down. #3844

Closed botwhytho closed 6 days ago

botwhytho commented 1 week ago

Currently, in some scenarios, like scrolling through a Lepiter page that has embedded Mondrian elements, the page scrolling is disrupted once the mouse is over a Mondrian element and the element gets zoomed in/out. This is not the desired outcome. There is also a precedent for up/down scrolling doing something different when modifiers are held, if shift is held, it enables left/right scrolling. Holding down primary while scrolling up/down would add a new dimension to this and seems to fit in with other existing UX interactions.

botwhytho commented 1 week ago

Before (from Discord thread). Since the zoom handler doesn't consume the event, we also get two distinct behaviors at once, zooming and AND scrolling, which is not desired.

https://github.com/feenkcom/gtoolkit/assets/21220773/eb31da0e-702f-41bc-96b1-404c00da61fb

botwhytho commented 1 week ago

First PR Created https://github.com/feenkcom/Bloc/pull/18

botwhytho commented 1 week ago

Second PR Created https://github.com/feenkcom/gtoolkit-visualizer/pull/10 (depends on first one)

botwhytho commented 1 week ago

After:

https://github.com/feenkcom/gtoolkit/assets/21220773/25ee323a-7b3f-421a-8df8-2e6540de6869

JurajKubelka commented 6 days ago

@botwhytho: thank you for the contribution.