breadboard-ai / breadboard

A library for prototyping generative AI applications.
Apache License 2.0
162 stars 22 forks source link

Add setting to allow mouse navigation #2445

Open Mearman opened 2 months ago

Mearman commented 2 months ago

I think Miro have the UX pretty nailed down for this with switching between Mouse and Trackpad based navigation. see here

If you use a mouse, you can also move around the board

while holding the right mouse button with the left mouse button while holding the Space bar with the left mouse button while holding the mouse wheel (available for some mice only)

also their other shortcuts for reference: https://help.miro.com/hc/en-us/articles/360017731033-Shortcuts-and-hotkeys

alexandraM98 commented 2 weeks ago

I've been looking into this issue and wanted to share an update. On this branch, I added a new checkbox to the General section of the visual editor settings as you can see below:

Screenshot 2024-08-27 at 16 03 35

Enabling the checkbox allows users to navigate around the canvas by holding down the right mouse button. To explain a bit better what is happening at the moment, when Use mouse based navigation is checked, the user can move around the canvas using the right mouse button or by holding Space and using any mouse button.

However, in order to zoom in, users must have either the option or command key pressed while scrolling with the mouse wheel. It feels like the wheel event should also be modified when the Use mouse based navigation checkbox is checked, so that the user can zoom in and out using the mouse wheel.

Any thoughts on this are appreciated!