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

Add Zooming Controls to Visualizer #762

Open
wants to merge 5 commits into
base: explore-cytoscape
Choose a base branch
from

Conversation

aamanrebello
Copy link

@aamanrebello aamanrebello commented Jan 3, 2025

NEW DESCRIPTION (after commit 84893cc)

PR follows the mock up described by Mackenzie Bennett. Happy to act on suggestions to improve UI/code quality.

zoom-plan

After clicking button is below. Zoom can also be adjusted by zooming on the keypad.

zoom-plan

OLD DESCRIPTION (before commit 84893cc)

Note: In the UI that we discussed with Mackenzie Bennett, the plan was for the Zoom to be in the Navbar like so:

zoom-plan

This may be down to my low experience in React but when I tried to make the zoom state accessible from the cytoscape renderer in the navbar (tried several things: callback functions, moving the state to the common parent - I didn't try a childRef but I thought that would have the same result) it broke the zooming on the cytoscape graph i.e. when you expanded on the keypad, the zoom would bounce around through random incorrect values and the graph would rotate - not ideal. Hence for now, I have done this:

zoom-controls

Below shows what happens when you click one of the buttons. You can zoom by clicking buttons or using your keypad.

zoom-controls-2

Please feel free to provide me guidance, or suggest edits, if you want to see UI improvements such as moving the Zoom to the navbar.

@aamanrebello aamanrebello requested a review from a team as a code owner January 3, 2025 12:11
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

Successfully merging this pull request may close these issues.

1 participant