onTouchEnd method

dynamic onTouchEnd(
  1. dynamic event
)

Implementation

onTouchEnd(event) {
  switch (_pointers.length) {
    case 0:
      _state = STATE.NONE;
      break;

    case 1:
      _state = STATE.TOUCH_ROTATE;
      _moveCurr.copy(getMouseOnCircle(event.pageX, event.pageY));
      _movePrev.copy(_moveCurr);
      break;

    case 2:
      _state = STATE.TOUCH_ZOOM_PAN;
      _moveCurr.copy(getMouseOnCircle(
          event.pageX - _movePrev.x, event.pageY - _movePrev.y));
      _movePrev.copy(_moveCurr);
      break;
  }

  scope.dispatchEvent(_endEvent);
}