mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-20 15:57:06 +08:00
fix(editor): should not show toolbar when elements have been deleted (#11026)
Closes: [BS-2691](https://linear.app/affine-design/issue/BS-2691/[bug]-当-edgeless-为空的时候,点击-space-会在左上角出现一个莫名的-toolbar)
This commit is contained in:
@@ -157,6 +157,9 @@ export class AffineToolbarWidget extends WidgetComponent {
|
||||
.map(id => gfx.getElementById(id))
|
||||
.filter(model => model !== null) as GfxModel[];
|
||||
|
||||
// Should double check
|
||||
activated &&= Boolean(elements.length);
|
||||
|
||||
hasLocked = elements.some(e => e.isLocked());
|
||||
|
||||
const grouped = groupBy(
|
||||
|
||||
Reference in New Issue
Block a user