onTriplePanStart method

dynamic onTriplePanStart(
  1. dynamic event
)

Implementation

onTriplePanStart(event) {
  if (enabled && enableZoom) {
    dispatchEvent(_startEvent);

    updateTbState(State2.scale, true);

    //var center = event.center;
    num clientX = 0;
    num clientY = 0;
    var nFingers = _touchCurrent.length;

    for (var i = 0; i < nFingers; i++) {
      clientX += _touchCurrent[i]!.clientX;
      clientY += _touchCurrent[i]!.clientY;
    }

    setCenter(clientX / nFingers, clientY / nFingers);

    _startCursorPosition.setY(getCursorNDC(_center.x, _center.y, domElement).y * 0.5);
    _currentCursorPosition.copy(_startCursorPosition);
  }
}