protected override void handleTapUp(PointerDownEvent down, PointerUpEvent up) { TapUpDetails details = new TapUpDetails( globalPosition: up.position, localPosition: up.localPosition, kind: up.kind, device: up.device ); if (this.onTapUp != null) { this.invokeCallback <object>("onTapUp", () => { this.onTapUp(details); return(null); }); } if (this.onTap != null) { this.invokeCallback <object>("onTap", () => { this.onTap(); return(null); }); } }
void _reset() { this._sentTapDown = false; this._wonArenaForPrimaryPointer = false; this._up = null; this._down = null; }
protected override void handlePrimaryPointer(PointerEvent evt) { if (evt is PointerUpEvent) { _up = (PointerUpEvent)evt; _finalPosition = new OffsetPair(global: evt.position, local: evt.localPosition); _checkUp(); } else if (evt is PointerCancelEvent) { resolve(GestureDisposition.rejected); if (_sentTapDown) { _checkCancel((PointerCancelEvent)evt, ""); } _reset(); } else if (evt.buttons != _down?.buttons) { resolve(GestureDisposition.rejected); stopTrackingPointer(primaryPointer); } }
void _reset() { _sentTapDown = false; _wonArenaForPrimaryPointer = false; _up = null; _down = null; }
protected override void handlePrimaryPointer(PointerEvent evt) { if (evt is PointerUpEvent) { this._up = (PointerUpEvent)evt; this._checkUp(); } else if (evt is PointerCancelEvent) { this.resolve(GestureDisposition.rejected); if (this._sentTapDown) { this._checkCancel((PointerCancelEvent)evt, ""); } this._reset(); } else if (evt.buttons != this._down?.buttons) { this.resolve(GestureDisposition.rejected); this.stopTrackingPointer(this.primaryPointer); } }
protected abstract void handleTapUp(PointerDownEvent down, PointerUpEvent up);