How to zoom in/out at the selected node with keyboard?

I completed the work to zoom in/out the diagram with setting the property “scale”. And I set the “zoomPoint” with one selected node’s property “position” defined in gojs. But it is not zoomed in/out at that node. It seems that “zoomPoint” must be positive but “position” can be negative. They are of different definition. How can I get the right value of the node for “zoomPoint”? Is there another way to zoom in/out the diagram with one selected node centered?

That’s correct – Node.location or Node.position are in document coordinates, while Diagram.zoomPoint is in viewport coordinates.

Please read more at GoJS Coordinate Systems-- Northwoods Software. That also talks about converting between coordinate systems.