This sample demonstrates the DragZoomingTool, which replaces the standard DragSelectingTool. It is defined in its own file, as DragZoomingTool.js.

Press in the background, wait briefly, and then drag to zoom in to show the area of the drawn rectangle. Hold down the Shift key to zoom out. The rectangle always has the same aspect ratio as the viewport of the diagram.

加入 GoJS 交流群
GoJS 交流群 (769862113)