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

Fix: center on node feature works with collapsible disabled #456

Closed
wants to merge 3 commits into from

Conversation

jawwad-btrt
Copy link
Contributor

@jawwad-btrt jawwad-btrt commented Apr 11, 2023

Fixes #386.

If you disable collapsible, the "center on node" feature (via dimensions prop) ceases to work. My understanding is this due to the fact that a click on the node wouldn't trigger an update of the component. This PR adds the wasClicked state to the shouldNotTransform criteria. Tested this locally and it seems to work, as shown in attached clip.

screenrecording.mov

@jawwad-btrt
Copy link
Contributor Author

jawwad-btrt commented Apr 12, 2023

Apologies, realised I accidentally created this PR from master on my fork. Closing this out in favour of #457

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.

Center Node feature only works when toggling the node. Not working with onNodeClick
1 participant