sangnv
1
I’m using genogram sample.
this’s my code:
const node = diagram.findNodeForKey(-43);
diagram.centerRect(node.actualBounds);
The node don’t center in the viewport. It should position the entry exactly center of viewport. Please help me for this case.
walter
2
It might be that it cannot scroll far enough to put that particular node in the center of the viewport.
Please read:
https://gojs.net/latest/intro/initialView.html
https://gojs.net/latest/intro/viewport.html
sangnv
3
So I have no way if I don’t change the scale value for this case, right?
walter
Split this topic
4
A post was split to a new topic: Animating scrolling
walter
5
Didn’t you read GoJS Coordinate Systems-- Northwoods Software, setting Diagram.padding?
Or GoJS Coordinate Systems-- Northwoods Software, setting Diagram.scrollMode or Diagram.scrollMargin?
sangnv
6
I set Diagram.scrollMode is Diagram.InfiniteScroll. It worked. Thanks for your support.