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

Option to disable mousewheel zoom #130

Open
davidchall opened this issue Oct 31, 2023 · 2 comments
Open

Option to disable mousewheel zoom #130

davidchall opened this issue Oct 31, 2023 · 2 comments
Labels
feature Feature requests or improvements good first issue Good for newcomers

Comments

@davidchall
Copy link

davidchall commented Oct 31, 2023

Is your feature request related to a problem? Please describe.
I'd like the ability to create a graph widget where the zoom functionality is disabled. The motivation is that sometimes the user can accidentally trigger the zoom action, which can make the page more difficult to navigate. This option would render the graph more statically, though tooltips and click hooks would remain available.

Describe the solution you'd like
This could be a constructor argument (e.g., dd3.DagreD3Widget(zoom=False)), since this is not passed as a dagre graph attribute.

Describe alternatives you've considered
I'm not sure if there are alternative ways to disable zoom via javascript.

@timkpaine timkpaine added feature Feature requests or improvements good first issue Good for newcomers labels Oct 31, 2023
@timkpaine
Copy link
Owner

One issue with this is that graph placement is imperfect, it uses a heuristic based on the size of the graph / number of nodes.

@davidchall
Copy link
Author

davidchall commented Dec 12, 2023

Thanks for highlighting this constraint. In that case, my feature request is an option to disable zoom behavior triggered by mousewheel, and replace with an alternative trigger (e.g., Ctrl+mousewheel, 2 buttons).

@davidchall davidchall changed the title Option to disable zoom Option to disable mousewheel zoom Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests or improvements good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants