mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): edgeless toolbar lock and unlock actions (#10878)
This commit is contained in:
@@ -139,7 +139,13 @@ abstract class ToolbarContextBase {
|
||||
|
||||
getSurfaceModels() {
|
||||
if (this.hasSelectedSurfaceModels) {
|
||||
const elements = this.elementsMap$.peek().get(this.flavour$.peek());
|
||||
const flavour = this.flavour$.peek();
|
||||
const elementsMap = this.elementsMap$.peek();
|
||||
const elements = ['affine:surface', 'affine:surface:locked'].includes(
|
||||
flavour
|
||||
)
|
||||
? Array.from(elementsMap.values()).flat()
|
||||
: elementsMap.get(flavour);
|
||||
return elements ?? [];
|
||||
}
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user