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:
fundon
2025-04-03 11:13:09 +00:00
parent a9ba54a92e
commit 565d7b2b1e
7 changed files with 74 additions and 26 deletions
@@ -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
);
}