chore(editor): remove edgeless element toolbar (#10900)

This commit is contained in:
fundon
2025-03-20 02:08:21 +00:00
parent 831f290f84
commit 8b995ea420
71 changed files with 330 additions and 6449 deletions
@@ -373,8 +373,16 @@ export class AffineToolbarWidget extends WidgetComponent {
// Triggered only when not in editing state.
disposables.add(
context.gfx.selection.slots.updated.subscribe(selections => {
// TODO(@fundon): should remove it when edgeless element toolbar is removed
if (context.isEdgelessMode) return;
// Should remove selections when clicking on frame navigator
if (context.isPageMode) {
if (
std.host.contains(std.range.value?.commonAncestorContainer ?? null)
) {
std.range.clear();
}
context.reset();
return;
}
const elementIds = selections
.map(s => (s.editing || s.inoperable ? [] : s.elements))