@univerjssheets-uiindexclassesSheetsscrollrendercontroller

@univerjs/sheets-ui v0.5.4


Class: SheetsScrollRenderController

Defined in: submodules/univer/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts:50

This controller handles scroll logic in sheet interaction.

Extends

Implements

Constructors

new SheetsScrollRenderController()

new SheetsScrollRenderController(
   _context, 
   _injector, 
   _sheetSkeletonManagerService, 
   _contextService, 
   _commandService, 
   _renderManagerService, 
   _scrollManagerService): SheetsScrollRenderController

Defined in: submodules/univer/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts:51

Parameters

ParameterType
_contextIRenderContext<Workbook>
_injectorInjector
_sheetSkeletonManagerServiceSheetSkeletonManagerService
_contextServiceIContextService
_commandServiceICommandService
_renderManagerServiceIRenderManagerService
_scrollManagerServiceSheetScrollManagerService

Returns

SheetsScrollRenderController

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96

Methods

dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109

Returns

void

Implementation of

IRenderModule.dispose

Inherited from

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


scrollToCell()

scrollToCell(row, column): boolean

Defined in: submodules/univer/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts:292

Scroll spreadsheet(viewMain) to cell position. Based on the limitations of viewport and the number of rows and columns, you can only scroll to the maximum scrollable range.

if column A ~ B is frozen. set second param to 0 would make viewMain start at column C. set second param to 2 would make viewMain start at column E.

Parameters

ParameterTypeDescription
rownumberCell row
columnnumberCell column

Returns

boolean

  • true if scroll is successful

scrollToRange()

scrollToRange(
   range, 
   forceTop?, 
   forceLeft?): boolean

Defined in: submodules/univer/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts:263

Parameters

ParameterType
rangeIRange
forceTop?boolean
forceLeft?boolean

Returns

boolean