handlerPointerCancel method

  1. @override
bool handlerPointerCancel(
  1. PointerCancelEvent event
)
override

Implementation

@override
bool handlerPointerCancel(PointerCancelEvent event) {
  final gEvent = GestureEvent.fromPointerEvent(
    event,
    screenToWorld: gameRef.screenToWorld,
    globalToViewportPosition: gameRef.globalToViewportPosition,
  );
  if (gEvent.pointer == _pointer && _inMoving) {
    _startDragPosition = null;
    _startDragOffset = null;
    _pointer = -1;
    _inMoving = false;
    onCancelDrag(gEvent);
  }
  return super.handlerPointerCancel(event);
}