API Reference
@univerjs
@univerjs/engine-render
classes
Sheetextension

@univerjs/engine-render v0.4.2Docs


Class: SheetExtension

Extends

Extended by

Constructors

new SheetExtension()

new SheetExtension(): SheetExtension

Returns

SheetExtension

Inherited from

ComponentExtension.constructor

Properties

PropertyModifierTypeDefault valueOverridesInherited fromDefined in
Z_INDEXprotectednumber0-ComponentExtension.Z_INDEXsubmodules/univer/packages/engine-render/src/components/extension.ts:45 (opens in a new tab)
extensionOffsetpublicIExtensionConfig{}-ComponentExtension.extensionOffsetsubmodules/univer/packages/engine-render/src/components/extension.ts:53 (opens in a new tab)
parentpublicNullable<BaseObject>undefined-ComponentExtension.parentsubmodules/univer/packages/engine-render/src/components/extension.ts:47 (opens in a new tab)
translateXpublicnumber0-ComponentExtension.translateXsubmodules/univer/packages/engine-render/src/components/extension.ts:49 (opens in a new tab)
translateYpublicnumber0-ComponentExtension.translateYsubmodules/univer/packages/engine-render/src/components/extension.ts:51 (opens in a new tab)
typepublicSHEET_EXTENSION_TYPESHEET_EXTENSION_TYPE.GRIDComponentExtension.type-submodules/univer/packages/engine-render/src/components/sheets/extensions/sheet-extension.ts:34 (opens in a new tab)
uKeypublicstring''-ComponentExtension.uKeysubmodules/univer/packages/engine-render/src/components/extension.ts:41 (opens in a new tab)

Accessors

zIndex

get zIndex(): number

Returns

number

Inherited from

ComponentExtension.zIndex

Defined in

submodules/univer/packages/engine-render/src/components/extension.ts:55 (opens in a new tab)

Methods

_getScale()

protected _getScale(parentScale): number

Parameters

ParameterType
parentScaleIScale

Returns

number

Inherited from

ComponentExtension._getScale

Defined in

submodules/univer/packages/engine-render/src/components/extension.ts:67 (opens in a new tab)


clearCache()

clearCache(): void

Returns

void

Inherited from

ComponentExtension.clearCache

Defined in

submodules/univer/packages/engine-render/src/components/extension.ts:63 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

ComponentExtension.dispose

Defined in

submodules/univer/packages/engine-render/src/components/extension.ts:71 (opens in a new tab)


draw()

draw(
   ctx, 
   parentScale, 
   skeleton, 
   diffBounds?, 
   more?): void

Parameters

ParameterType
ctxUniverRenderingContext
parentScaleIScale
skeletonSpreadsheetSkeleton
diffBounds?IRange[]
more?IDrawInfo

Returns

void

Inherited from

ComponentExtension.draw

Defined in

submodules/univer/packages/engine-render/src/components/extension.ts:59 (opens in a new tab)


getCellByIndex()

getCellByIndex(
   rowIndex, 
   columnIndex, 
   rowHeightAccumulation, 
   columnWidthAccumulation, 
   dataMergeCache): ISelectionCellWithMergeInfo

Parameters

ParameterType
rowIndexnumber
columnIndexnumber
rowHeightAccumulationnumber[]
columnWidthAccumulationnumber[]
dataMergeCacheIRange[]

Returns

ISelectionCellWithMergeInfo

cell Position & mergeInfo

Deprecated

The function maybe cause performance issue, use spreadsheetSkeleton.getCellByIndexWithNoHeader instead. Get ISelectionCellWithMergeInfo by cell rowIndex and cell columnIndex. The startXY in return value does not include rowHeader and columnHeader.

Defined in

submodules/univer/packages/engine-render/src/components/sheets/extensions/sheet-extension.ts:48 (opens in a new tab)


isRenderDiffRangesByCell()

isRenderDiffRangesByCell(rangeP, diffRanges?): boolean

Parameters

ParameterType
rangePIRange
diffRanges?IRange[]

Returns

boolean

Defined in

submodules/univer/packages/engine-render/src/components/sheets/extensions/sheet-extension.ts:60 (opens in a new tab)


isRenderDiffRangesByColumn()

isRenderDiffRangesByColumn(
   curStartColumn, 
   curEndColumn, 
   diffRanges?): boolean

Parameters

ParameterType
curStartColumnnumber
curEndColumnnumber
diffRanges?IRange[]

Returns

boolean

Defined in

submodules/univer/packages/engine-render/src/components/sheets/extensions/sheet-extension.ts:97 (opens in a new tab)


isRenderDiffRangesByRow()

isRenderDiffRangesByRow(
   curStartRow, 
   curEndRow, 
   diffRanges?): boolean

Parameters

ParameterType
curStartRownumber
curEndRownumber
diffRanges?IRange[]

Returns

boolean

Defined in

submodules/univer/packages/engine-render/src/components/sheets/extensions/sheet-extension.ts:130 (opens in a new tab)


isRowInRanges()

isRowInRanges(
   curStartRow, 
   curEndRow, 
   viewranges?): boolean

传入的 row 范围和 diffRanges 有相交, 返回 true

Parameters

ParameterType
curStartRownumber
curEndRownumber
viewranges?IRange[]

Returns

boolean

Defined in

submodules/univer/packages/engine-render/src/components/sheets/extensions/sheet-extension.ts:169 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.