Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore(doc): remove commandObservers

Dushusir5302ef8974d3
diff --git a/packages/ui-plugin-docs/src/Controller/ToolbarUIController.ts b/packages/ui-plugin-docs/src/Controller/ToolbarUIController.ts
index 74258c466e..4cad4a8c01 100644
--- a/packages/ui-plugin-docs/src/Controller/ToolbarUIController.ts
+++ b/packages/ui-plugin-docs/src/Controller/ToolbarUIController.ts
@@ -596,14 +596,14 @@ export class ToolbarUIController {
this._plugin.getComponentManager().register(DOC_UI_PLUGIN_NAME + ColorSelect.name, ColorSelect);
this._plugin.getComponentManager().register(DOC_UI_PLUGIN_NAME + ColorPicker.name, ColorPicker);
- CommandManager.getCommandObservers().add(({ actions }) => {
- if (!actions || actions.length === 0) return;
- const action = actions[0] as SheetActionBase<ISheetActionData, ISheetActionData, void>;
+ // CommandManager.getCommandObservers().add(({ actions }) => {
+ // if (!actions || actions.length === 0) return;
+ // const action = actions[0] as SheetActionBase<ISheetActionData, ISheetActionData, void>;
- const currentUnitId = this._plugin.getContext().getUniver().getCurrentUniverSheetInstance().getWorkBook().getUnitId();
- const actionUnitId = action.getWorkBook().getUnitId();
+ // const currentUnitId = this._plugin.getContext().getUniver().getCurrentUniverSheetInstance().getWorkBook().getUnitId();
+ // const actionUnitId = action.getWorkBook().getUnitId();
- if (currentUnitId !== actionUnitId) return null;
- });
+ // if (currentUnitId !== actionUnitId) return null;
+ // });
}
}