Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
hyj1204 committed Aug 29, 2023
1 parent 0e77ec0 commit c8e4607
Showing 1 changed file with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ class _MobileSelectionServiceWidgetState
}

void _onPanDown(DragDownDetails details) {
print('onPanStart: ${details.globalPosition}');
// set the drag mode base on the user's start dragging position
final offset = details.globalPosition;
if (_isOverCursor(offset) == true) {
Expand All @@ -496,43 +495,6 @@ class _MobileSelectionServiceWidgetState
}
}

// void _onLongPressMoveUpdate(LongPressMoveUpdateDetails details) {
// Log.selection.debug(
// 'onLongPressMoveUpdate global: ${details.globalPosition} local :${details.localPosition}',
// );

// final offset = details.globalPosition;
// final selection = editorState.selection;
// if (selection == null) return;
// // TODO(yijing):Fix the cursor didn't update when dragging in the beginning of the line.
// print('_isOverCursor(offset) ${_isOverCursor(offset)}');

// print('_isOverLeftHandler(offset) ${_isOverLeftHandler(offset)}');
// print('_isOverRightHandler(offset) ${_isOverRightHandler(offset)}');

// if (_isOverCursor(offset) == true) {
// final position = getPositionInOffset(offset);
// if (position == null) return;
// editorState.selection = Selection.collapsed(position);
// return;
// }

// if (_isOverLeftHandler(offset) == true) {
// final position = getPositionInOffset(offset);
// print('_isOverLeftHandler ');
// editorState.selection = editorState.selection!.copyWith(
// start: position,
// );
// }
// if (_isOverRightHandler(offset) == true) {
// print('_isOverRightHandler ');
// final position = getPositionInOffset(offset);
// editorState.selection = editorState.selection!.copyWith(
// end: position,
// );
// }
// }

// The following methods decide if the current position(Offset) is over certain widget(cursor, left handler, right handler)

/// Check the point offset is over cursor
Expand Down

0 comments on commit c8e4607

Please sign in to comment.