projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.71k stars 1.18k forks source link

Creating a listener to zoom events? #1042

Closed r146023 closed 2 weeks ago

r146023 commented 2 weeks ago

I am a bit confused by how to actually create listeners for my custom node.

My goal is to have additional data appear when the zoom level is >= 120.
I currently have it setup where the widget queries the model to get the value, but this does not actively update like a listener would.

To be completely honest, I am a bit confused on how registering listeners works in general, is there any documentation on it? I have searched the site and found nothing that would guide me through learning it.

Thank you in advance!

r146023 commented 2 weeks ago

After going through all of the issues here I found this one: How to use events #164

Which directly answered my question, I do feel like this could be mentioned in the docs.