我该怎么设置,才能够有双击放大缩小的功能呢?

我现在已经有了鼠标滚轮放大缩小的功能,但是我不知道怎么设置双击也能放大的效果,万分感谢!

用这个,他是diagram 的一个属性,设置他,然后通过 CommandHandler去设置zoom

非常谢谢,我现在已经实现了功能,但是跟我想要的还是差了那么一点,怎么我的缩放点一直都是中心位置,我该怎么改变

If you always want the zoom point to be the center of the viewport, instead of where the mouse is, you can just set:

  myDiagram.zoomPoint = new go.Point(myDiagram.div.clientWidth/2, myDiagram.div.clientHeight/2);

现在我是想让鼠标位置,作为缩放点

If you want the zoom point to be where the mouse is:

  myDiagram.zoomPoint = myDiagram.lastInput.viewPoint;