How to place highlighted nodes in the center of the canvas?

hello,
I want to know how to automatically adjust the position of the whole diagram and make sure that the highlighted node are always in the center of the canvas.
Can anyone give me some advice?
thanks!

https://gojs.net/latest/intro/viewport.html#ViewportBounds discusses this.

ok,Thank you for your advice.I’ll try it.