Beispiel #1
0
        void _onDoubleTap(DoubleTapDetails doubleTapDetails)
        {
            if (this._scale < this._originalImageScale ||
                this._originalImageScale < 1.0f && this._scale > this._originalImageScale)
            {
                this._scaleAndMoveToClamped(
                    targetScale: this._originalImageScale,
                    this._computeNewPositionAfterScaleTo(targetScale: this._originalImageScale,
                                                         this._screenToFractional(offset: doubleTapDetails.firstGlobalPosition)));
            }
            else
            {
                this._scaleAndMoveTo(1, targetPosition: Offset.zero);
            }

            this._scaleAnimationController.setValue(0);
            this._scaleAnimationController.animateTo(1);
            this._positionAnimationController.setValue(0);
            this._positionAnimationController.animateTo(1);
        }
Beispiel #2
0
 public void handleDoubleTap(DoubleTapDetails details)
 {
     // need set _lastTapDownPosition, otherwise it would be last single tap position
     this._lastTapDownPosition = details.firstGlobalPosition - this._paintOffset;
     this.selectWord(cause: SelectionChangedCause.doubleTap);
 }
Beispiel #3
0
 void _handleDoubleTap(DoubleTapDetails details)
 {
     D.assert(!this.ignorePointer);
     this.handleDoubleTap(details);
 }
Beispiel #4
0
 public void handleDoubleTap(DoubleTapDetails details)
 {
     this._lastTapDownPosition = details.firstGlobalPosition - this._paintOffset;
     this.selectWord(cause: SelectionChangedCause.doubleTap);
 }