-
Notifications
You must be signed in to change notification settings - Fork 218
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
Calling ZoomToFit function on OnInitialized throws nullreference exception #118
Comments
Hello, |
Here DiagramDrawer is a class that lays out the diagram based on a json object (Config.plantConfig).
|
I could not reproduce the error on the sample project of this repo. I'll dig deeper whats happening. |
I believe that I fixed the NullReferenceException part. It was throwing it because the nodes didn't have a Since the library needs to know the canvas container and the nodes sizes, calling |
ZoomToFit function throws nullreference exception when its called from the components lifecycle function.
But it works when the function is called onbutton click or any dom events.
So I dont want the user to press a button everytime to fit the diagram on screen. Is there any workaround on this?
The text was updated successfully, but these errors were encountered: