Navigate to node

hi , i have a huge graph ~6000 nodes,
there is an option that on click on a button and i can navigate to this node on the diagram,
I tried with this with the focus function but it iw not navigate to the entity it just mark him.


thanks
or

Have you tried calling Diagram.centerRect or Diagram.scrollToRect?

no…
there is any demo of the functions?

yep it works thanks :)

Hi how it works!..

I too also have similar functionality to develop can you suggest how you done.

I need to navigate the searched word in the screen let say there is selected three nodes so I have given next previous buttons and I have node keys But it’s not working

Thanks in advance…

That Org Chart sample already demonstrates what you are asking for. Look at the code that calls Diagram.centerRect.

Maybe more user friendly would be to call CommandHandler.scrollToPart, which will animate the scrolling.

All of these calls should be made only after the initial layout has occurred, or else the nodes won’t be in the locations where they should be.

Yes static template is available but If I typed Head in search text box there are 3 nodes getting highlighted. Those 3 highlighted nodes I need to navigate using next previous buttons for that any predefined methods are available ?

You can check the previous post screen shot.

Hit the spacebar to scroll to the next selected Part. It just calls CommandHandler.scrollToPart without any arguments.
CommandHandler | GoJS API
GoJS Commands -- Northwoods Software