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

Menu hide itself when zoom in graph #74

Open
Nicolas-PredictaLab opened this issue Jan 5, 2023 · 1 comment
Open

Menu hide itself when zoom in graph #74

Nicolas-PredictaLab opened this issue Jan 5, 2023 · 1 comment

Comments

@Nicolas-PredictaLab
Copy link

Hello,

image

I've a very long submenu under "Social" submenu and I've managed to set a height and a overflow-y : auto in CSS but whenever I scroll in the submenu, the graph itself if zooming and then, menu closed itself.
Everything is 'normal' from what I've seen in the library code, but how to prevent this ?
I see 2 ways :

  • Having a method that return a boolean whether or not the context-menu is shown, that boolean can then be used to disabled graph zoom for example.
  • Having the possibility to disabled auto close menu on zoom maybe ?

Thanks for feedbacks,
Have a nice day.

@Nicolas-PredictaLab
Copy link
Author

An hacky way if to do like this :

// Disable zooming when user open the submenu
cy.on('cxttap', () => cy.userZoomingEnabled(false))
// Enable it again when user tap or modify viewport
cy.on('tap viewport', () => cy.userZoomingEnabled(true))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant