Document positioning during a zoom operation


When I use increaseZoom, the diagram (earlier zoomed to fit) repositions such that it appears to move to the right. How can I ensure that increasing zoom always focuses on the center of the viewport, without shifting the document to either side?

You could try setting Diagram.zoomPoint, an undocumented property, to be a Point denoting the center of the viewport, half the DIV’s width and height. This Point is not in document coordinates.

This is actually how Tool.standardMouseWheel is implemented.

<span role=“presentation” =" -errorMessage hasBreakSwitch "><span ="errorMessage ">w00t! Thanks - that was exactly what I needed! :)