onTriplePanStart method

dynamic onTriplePanStart(
  1. dynamic event
)

Implementation

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

    this.updateTbState(STATE2.SCALE, true);

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

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

    this.setCenter(clientX / nFingers, clientY / nFingers);

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