Open AZbang opened 4 years ago
I want to do zoomToFit immediately after loading the page, however when I call engine.zoomToFitNodes after engine.repaintCanvas () I get incorrect result. Apparently the sizes of the nodes have not yet been determined by this moment.
Just use something like an _.defer or timeout, and/or hook into the lifecycle methods of the engine and nodes.
_.defer
I want to do zoomToFit immediately after loading the page, however when I call engine.zoomToFitNodes after engine.repaintCanvas () I get incorrect result. Apparently the sizes of the nodes have not yet been determined by this moment.