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
refactor(sheet): extract magic number
Wenzhao Hu3d1b6aaa95a5
diff --git a/packages/ui-plugin-sheets/src/views/header-unhide-shape.ts b/packages/ui-plugin-sheets/src/views/header-unhide-shape.tsindex fcbe30638e..81c1ab5c07 100644--- a/packages/ui-plugin-sheets/src/views/header-unhide-shape.ts+++ b/packages/ui-plugin-sheets/src/views/header-unhide-shape.ts@@ -18,9 +18,12 @@ export interface IHeaderUnhideShapeProps extends IShapeProps {hasNext: boolean;}+const UNHIDE_ICON_SIZE = 12;+const UNHIDE_ARROW_RATIO = 0.4;+export class HeaderUnhideShape<T extends IHeaderUnhideShapeProps = IHeaderUnhideShapeProps> extends Shape<T> {- private _size = 12;- private _iconRatio = 0.4;+ private _size = UNHIDE_ICON_SIZE;+ private _iconRatio = UNHIDE_ARROW_RATIO;private _hovered = true;private _hasPrevious = true;private _hasNext = true;