PinchZoom and CommandHandler

I have two custom methods : increaseZoom and decreaseZoom. Basically I overwrited these two methods for two reasons :

1- To use customized Zoom Level values.

2- Call some internal actions whenever the action occurs.

I just tested the Diagram in some touch screen devices and I see that the PinchZoom does not call increaseZoom and decreaseZoom.

Maybe I didn’t consider all the case of the Zoom Management ? I thought these two methods cover all the Zoom actions regardless the input source. (See the documentation text below)

Any hint about the Pinch Zoom and how to overwrite its default behavior ?

Commands

Commands such as Delete or Paste or Undo are implemented by the CommandHandler class.

Keyboard events, like mouse and touch events, always go to the Diagram.currentTool. The current tool, when the user is not performing some gesture, is the same as the Diagram.defaultTool, which normally is the Diagram.toolManager. The ToolManager handles keyboard events by delegating them to the Diagram.commandHandler.

Pinch zooming uses Tool.standardPinchZoomMove, which calls CommandHandler.resetZoom.

So if you override resetZoom, you can define the behavior you’d like. Note that resetZoom takes a new scale number rather than a zoom factor.

Note that there’s also CommandHandler.zoomToFit if you need custom behavior on all zooming commands.