Skip to content

Commit

Permalink
fix: the slash menu shows in incorrect position
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Sep 19, 2023
1 parent c0782f7 commit abaa0ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
6 changes: 6 additions & 0 deletions lib/src/editor/selection_menu/selection_menu_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ class SelectionMenu extends SelectionMenuService {

@override
void show() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
_show();
});
}

void _show() {
dismiss();

final selectionService = editorState.service.selectionService;
Expand Down
15 changes: 0 additions & 15 deletions lib/src/editor_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -422,21 +422,6 @@ class EditorState {
}
}

/*
final rects = nodes
.map(
(node) => node.selectable
?.getRectsInSelection(selection)
.map(
(rect) => node.renderBox?.localToGlobal(rect.topLeft),
)
.whereNotNull(),
)
.whereNotNull()
.expand((element) => element)
.toList();
*/

return rects;
}

Expand Down

0 comments on commit abaa0ba

Please sign in to comment.