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
Parameter | Type |
---|---|
_instanceSrv | IUniverInstanceService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | RxDisposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_instanceSrv | readonly | IUniverInstanceService | undefined | - | - | submodules/univer/packages/sheets/src/services/selections/selection.service.ts:61 |
_workbookSelections | protected | Map <string , WorkbookSelectionModel > | undefined | - | - | submodules/univer/packages/sheets/src/services/selections/selection.service.ts:197 |
dispose$ | protected | Subject <void > | undefined | - | RxDisposable .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:120 |
selectionMoveEnd$ | public | Observable <ISelectionWithStyle []> | undefined | Selection 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$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | Selection 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$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | Selection 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$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | Selection 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
Parameter | Type |
---|---|
unitId | string |
Returns
_getCurrentSelections()
protected _getCurrentSelections(): ISelectionWithStyle[]
Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:183
Returns
_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
Parameter | Type |
---|---|
unitId | string |
Returns
void
addSelections()
Call Signature
addSelections(selectionsData): void
Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:97
Parameters
Parameter | Type |
---|---|
selectionsData | ISelectionWithStyle [] |
Returns
void
Call Signature
addSelections(
unitId,
worksheetId,
selectionDatas): void
Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:98
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
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
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
Returns
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
Parameter | Type |
---|---|
selectionDatas | ISelectionWithStyle [] |
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
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void