onPointerDown method

  1. @override
void onPointerDown(
  1. MapPosition position,
  2. int pointerId,
  3. Offset offset,
  4. Map<int, Offset> pointers,
)
override

Implementation

@override
void onPointerDown(MapPosition position, int pointerId, Offset offset, Map<int, Offset> pointers) {
  //_log.info("down ${pointers.length}, active $_moveActive, timer: ${activeTimer()}, swipetimer: $_swipeTimer, offset $_swipeOffset");
  if (pointers.length > 1) {
    cancelTimer();
    _moveActive = false;
    _swipeOffset = null;
    _nextManualMoveEvent = 0;
    return;
  }
  // cancel swiping
  _swipeTimer?.cancel();
  _swipeTimer = null;

  _moveActive = false;
  _swipeOffset = null;
  _nextManualMoveEvent = 0;

  _lastOffset = const MappointRelative.zero();
  super.onPointerDown(position, pointerId, offset, pointers);
}