About touch screen devices

Hello, I’ve had a problem lately. Touch screen devices,
For example, this instance: Flowchart
When I drag the element in the diagram,
if the fingers powerful to drag the element. it will careless drag the diagram
Whether you can two fingers drag diagram, single finger only to the element drag?

I think that one should be able to customize the PanningTool to do that. Give us some time to investigate it.

Very nice, thanks!

Try these tool overrides:

    // disable pinch zooming behaviors
    myDiagram.toolManager.canStartMultiTouch = function() {
      return false;

    // override PanningTool.canStart to start on touch events only when InputEvent.isMultiTouch
    myDiagram.toolManager.panningTool.canStart = function() {
      var can = go.PanningTool.prototype.canStart.call(this);
      if (!can) return false;
      var e = this.diagram.lastInput;
      if (e.isTouchEvent) return e.isMultiTouch;
      return true;

Thank you so much!
Also, the ’ pinch-zooming ’ does not work in this case.
I notice the description of ’ standardPinchZoomMove’ in the API document
Can I add the judging condition of the gesture in the code above?

If you want to support both pinch-zooming and panning with two fingers, that gets a lot more complicated. You would need to remove the two overrides above and implement a smart override of standardPinchZoomMove that ignored small differences in the distance between the first two touch points in order to pan.

Thank you, this is a demand on our product,
I am studying how to write this logic and look forward to Gojs next iteration to be able to better match the touchscreen device

Just to be clear, I do not believe we have any intention of changing the standard behavior to support panning without scaling during pinch zooming.

However I do believe there are many ways for you to implement such functionality.

We do have one example of overriding gesture behavior to do something different. This example zooms a selected node via pinch-zooming, instead of scaling the Diagram: https://codepen.io/simonsarris/pen/bYoZmY

Unfortunately, we do not have a precise example of what you want.