@univerjssheetsindexclassesSheetsselectionsservice

@univerjs/sheets v0.5.4


Class: SheetsSelectionsService

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:27

Extends

Extended by

Constructors

new SheetsSelectionsService()

new SheetsSelectionsService(_instanceSrv): SheetsSelectionsService

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:60

Parameters

ParameterType
_instanceSrvIUniverInstanceService

Returns

SheetsSelectionsService

Overrides

RxDisposable.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-RxDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_instanceSrvreadonlyIUniverInstanceServiceundefined--submodules/univer/packages/sheets/src/services/selections/selection.service.ts:61
_workbookSelectionsprotectedMap<string, WorkbookSelectionModel>undefined--submodules/univer/packages/sheets/src/services/selections/selection.service.ts:197
dispose$protectedSubject<void>undefined-RxDisposable.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:120
selectionMoveEnd$publicObservable<ISelectionWithStyle[]>undefinedSelection Events, usually triggered when pointerup in spreadsheet by selection render service after selectionModel has updated.-submodules/univer/packages/sheets/src/services/selections/selection.service.ts:53
selectionMoveStart$publicObservable<Nullable<ISelectionWithStyle[]>>undefinedSelection Events, usually triggered when pointerdown in spreadsheet by selection render service after selectionModel has updated.-submodules/univer/packages/sheets/src/services/selections/selection.service.ts:43
selectionMoving$publicObservable<Nullable<ISelectionWithStyle[]>>undefinedSelection Events, usually triggered when pointermove in spreadsheet by selection render service after selectionModel has updated.-submodules/univer/packages/sheets/src/services/selections/selection.service.ts:48
selectionSet$publicObservable<Nullable<ISelectionWithStyle[]>>undefinedSelection Events, usually triggered when changing unit.(focus in formula editor)-submodules/univer/packages/sheets/src/services/selections/selection.service.ts:58

Accessors

currentSelectionParam

Get Signature

get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:36

Returns

Nullable<ISelectionManagerSearchParam>

Methods

_ensureWorkbookSelection()

protected _ensureWorkbookSelection(unitId): WorkbookSelectionModel

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:198

Parameters

ParameterType
unitIdstring

Returns

WorkbookSelectionModel


_getCurrentSelections()

protected _getCurrentSelections(): ISelectionWithStyle[]

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:183

Returns

ISelectionWithStyle[]


_init()

protected _init(): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:67

Returns

void


_removeWorkbookSelection()

protected _removeWorkbookSelection(unitId): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:213

Parameters

ParameterType
unitIdstring

Returns

void


addSelections()

Call Signature

addSelections(selectionsData): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:97

Parameters
ParameterType
selectionsDataISelectionWithStyle[]
Returns

void

Call Signature

addSelections(
   unitId, 
   worksheetId, 
   selectionDatas): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:98

Parameters
ParameterType
unitIdstring
worksheetIdstring
selectionDatasISelectionWithStyle[]
Returns

void


clear()

clear(): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:84

Clear all selections in all workbooks. invoked by prompt.controller

Returns

void


clearCurrentSelections()

clearCurrentSelections(): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:152

Returns

void


dispose()

dispose(): void

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

Returns

void

Inherited from

RxDisposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

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

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

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

Returns

void

Inherited from

RxDisposable.ensureNotDisposed


getCurrentLastSelection()

getCurrentLastSelection(): DeepReadonly<Nullable<ISelectionWithStyle & {
  primary: ISelectionCell;
}>>

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:92

Returns

DeepReadonly<Nullable<ISelectionWithStyle & { primary: ISelectionCell; }>>


getCurrentSelections()

getCurrentSelections(): readonly ISelectionWithStyle[]

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:88

Returns

readonly ISelectionWithStyle[]


getWorkbookSelections()

getWorkbookSelections(unitId): WorkbookSelectionModel

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:193

Parameters

ParameterType
unitIdstring

Returns

WorkbookSelectionModel


isOverlapping()

isOverlapping(): boolean

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:162

Determine whether multiple current selections overlap

Returns

boolean

Deprecated

this should be extracted to an pure function


setSelections()

Call Signature

setSelections(selectionDatas, type?): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:121

Set selection data to WorkbookSelectionModel.

Parameters
ParameterType
selectionDatasISelectionWithStyle[]
type?SelectionMoveType
Returns

void

Call Signature

setSelections(
   unitId, 
   worksheetId, 
   selectionDatas, 
   type?): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:122

Set selection data to WorkbookSelectionModel.

Parameters
ParameterType
unitIdstring
worksheetIdstring
selectionDatasISelectionWithStyle[]
type?SelectionMoveType
Returns

void