Пример #1
0
        protected override void onSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details)
        {
            if (_delegate.selectionEnabled)
            {
                switch (Theme.of(_state.context).platform)
                {
                case RuntimePlatform.IPhonePlayer:
                case RuntimePlatform.OSXEditor:
                case RuntimePlatform.OSXPlayer:
                    renderEditable.selectPositionAt(
                        from: details.globalPosition,
                        cause: SelectionChangedCause.longPress
                        );
                    break;

                default:
                    renderEditable.selectWordsInRange(
                        from: details.globalPosition - details.offsetFromOrigin,
                        to: details.globalPosition,
                        cause: SelectionChangedCause.longPress
                        );
                    break;
                }
            }
        }
Пример #2
0
 void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details)
 {
     if (!_isDoubleTap && widget.onSingleLongTapMoveUpdate != null)
     {
         widget.onSingleLongTapMoveUpdate(details);
     }
 }
Пример #3
0
 void _handleSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details)
 {
     this._renderEditable.selectPositionAt(
         from: details.globalPosition,
         cause: SelectionChangedCause.longPress
         );
 }
Пример #4
0
 void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details)
 {
     if (!_checkVertical())
     {
         return;
     }
     _dragScrollbar(details.localPosition.dy - _dragScrollbarPositionY);
     _dragScrollbarPositionY = details.localPosition.dy;
 }
Пример #5
0
 void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details)
 {
     if (!_checkVertical())
     {
         return;
     }
     D.assert(_dragScrollbarPositionY != null);
     _dragScrollbar(details.localPosition.dy - _dragScrollbarPositionY.Value);
     _dragScrollbarPositionY = details.localPosition.dy;
 }
Пример #6
0
        void _handleSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details)
        {
            if (this.widget.selectionEnabled)
            {
                switch (Theme.of(this.context).platform)
                {
                case RuntimePlatform.IPhonePlayer:
                    this._renderEditable.selectPositionAt(
                        from: details.globalPosition,
                        cause: SelectionChangedCause.longPress
                        );
                    break;

                case RuntimePlatform.Android:
                    this._renderEditable.selectWordsInRange(
                        from: details.globalPosition - details.offsetFromOrigin,
                        to: details.globalPosition,
                        cause: SelectionChangedCause.longPress);
                    Feedback.forLongPress(this.context);
                    break;
                }
            }
        }