mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 16:19:43 +08:00
fix(editor): should not show inner toolbar of surface-ref in edgeless (#11453)
Closes: [BS-3015](https://linear.app/affine-design/issue/BS-3015/toolbar-有时会出现空状态且被显示) [BS-3023](https://linear.app/affine-design/issue/BS-3023/surface-ref-inner-toolbar-的标题圆角)
This commit is contained in:
@@ -46,10 +46,14 @@ export class ToolbarRegistryExtension extends Extension {
|
||||
return this.std.provider.getAll(ToolbarModuleIdentifier);
|
||||
}
|
||||
|
||||
getModuleBy(flavour: string) {
|
||||
return this.modules.get(flavour)?.config ?? null;
|
||||
}
|
||||
|
||||
getModulePlacement(flavour: string, fallback: ToolbarPlacement = 'top') {
|
||||
return (
|
||||
this.modules.get(`custom:${flavour}`)?.config.placement ??
|
||||
this.modules.get(flavour)?.config.placement ??
|
||||
this.getModuleBy(`custom:${flavour}`)?.placement ??
|
||||
this.getModuleBy(flavour)?.placement ??
|
||||
fallback
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user