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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: changeToolBar bug
jerry4f64e15d4828
diff --git a/packages/base-sheets/src/Controller/ToolBarController.ts b/packages/base-sheets/src/Controller/ToolBarController.tsindex dff4bde162..523befe198 100644--- a/packages/base-sheets/src/Controller/ToolBarController.ts+++ b/packages/base-sheets/src/Controller/ToolBarController.ts@@ -60,6 +60,7 @@ export class ToolBarController {const underline = range.getUnderline();const horizontalAlign = range.getHorizontalAlignment();const verticalAlign = range.getVerticalAlignment();+ const rotation = range.getTextRotation();console.log('cellMatrix:', cellMatrix);console.log('fontSize:', fontSize);@@ -78,6 +79,7 @@ export class ToolBarController {const underlineItem = this._toolList.find((item) => item.name === 'underline');const horizontalAlignModeItem = this._toolList.find((item) => item.name === 'horizontalAlignMode');const verticalAlignModeItem = this._toolList.find((item) => item.name === 'verticalAlignMode');+ const textRotateModeItem = this._toolList.find((item) => item.name === 'textRotateMode');if (fontNameItem) {fontNameItem.children?.forEach((item) => {@@ -111,6 +113,11 @@ export class ToolBarController {item.selected = verticalAlign === item.value;});}+ if (textRotateModeItem) {+ textRotateModeItem.children?.forEach((item) => {+ item.selected = rotation === item.value;+ });+ }this.resetToolBarList();}