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 #457

Merged

Conversation

jawwad-btrt
Copy link
Contributor

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

Copy link
Owner

@bkrem bkrem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thank you! 🙏

@bkrem bkrem merged commit 209f32b into bkrem:master Apr 12, 2023
@bkrem
Copy link
Owner

bkrem commented Apr 12, 2023

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
2 participants