Skip to content

Commit ea28228

Browse files
demoYangxuyang
andauthored
Not show/update/hiden mangnifier when manifier config is disbale (singerdmx#2212)
* [chore]: change gesture * [chore]: change gesture * [chore]: code fromatter * [chore]: remove code * [chore]: add code commentary * [chore] : not show/update/hiden mangnifier when manifier config is disbale --------- Co-authored-by: xuyang <[email protected]>
1 parent 02065c6 commit ea28228

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/editor/widgets/text/text_selection.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,18 +382,21 @@ class EditorTextSelectionOverlay {
382382
}
383383

384384
void _onHandleDragStart(DragStartDetails details, TextPosition position) {
385+
if (magnifierConfiguration == TextMagnifierConfiguration.disabled) return;
385386
if (defaultTargetPlatform != TargetPlatform.iOS &&
386387
defaultTargetPlatform != TargetPlatform.android) return;
387388
showMagnifier(position, details.globalPosition, renderObject);
388389
}
389390

390391
void _onHandleDragUpdate(DragUpdateDetails details, TextPosition position) {
392+
if (magnifierConfiguration == TextMagnifierConfiguration.disabled) return;
391393
if (defaultTargetPlatform != TargetPlatform.iOS &&
392394
defaultTargetPlatform != TargetPlatform.android) return;
393395
updateMagnifier(position, details.globalPosition, renderObject);
394396
}
395397

396398
void _onHandleDragEnd(DragEndDetails details) {
399+
if (magnifierConfiguration == TextMagnifierConfiguration.disabled) return;
397400
if (defaultTargetPlatform != TargetPlatform.iOS &&
398401
defaultTargetPlatform != TargetPlatform.android) return;
399402
hideMagnifier();

0 commit comments

Comments
 (0)