@univerjs/sheets v0.5.0-beta.1 • Docs
Class: SheetsSelectionsService
Extends
Extended by
Constructors
new SheetsSelectionsService()
new SheetsSelectionsService(_instanceSrv): SheetsSelectionsService
Parameters
Parameter | Type |
---|---|
_instanceSrv | IUniverInstanceService |
Returns
Overrides
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:44
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | RxDisposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_instanceSrv | readonly | IUniverInstanceService | undefined | - | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:45 |
_workbookSelections | protected | Map <string , WorkbookSelectionModel > | undefined | - | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:176 |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:117 |
selectionMoveEnd$ | public | Observable <ISelectionWithStyle []> | undefined | - | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:42 |
selectionMoveStart$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | - | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:40 |
selectionMoving$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | - | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:41 |
Accessors
currentSelectionParam
Get Signature
get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>
Returns
Nullable
<ISelectionManagerSearchParam
>
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:36
Methods
_ensureWorkbookSelection()
protected _ensureWorkbookSelection(unitId): WorkbookSelectionModel
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:177
_getCurrentSelections()
protected _getCurrentSelections(): ISelectionWithStyle[]
Returns
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:162
_init()
protected _init(): void
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:51
_removeWorkbookSelection()
protected _removeWorkbookSelection(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:192
addSelections()
addSelections(selectionsData)
addSelections(selectionsData): void
Parameters
Parameter | Type |
---|---|
selectionsData | ISelectionWithStyle [] |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:80
addSelections(unitId, worksheetId, selectionDatas)
addSelections(
unitId,
worksheetId,
selectionDatas): void
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:81
clear()
clear(): void
Clear all selections in all workbooks. invoked by prompt.controller
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:67
clearCurrentSelections()
clearCurrentSelections(): void
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:131
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:119
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
getCurrentLastSelection()
getCurrentLastSelection(): DeepReadonly<Nullable<ISelectionWithStyle & {
primary: ISelectionCell;
}>>
Returns
DeepReadonly
<Nullable
<ISelectionWithStyle
& {
primary
: ISelectionCell
;
}>>
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:75
getCurrentSelections()
getCurrentSelections(): readonly ISelectionWithStyle[]
Returns
readonly ISelectionWithStyle
[]
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:71
getWorkbookSelections()
getWorkbookSelections(unitId): WorkbookSelectionModel
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:172
isOverlapping()
isOverlapping(): boolean
Determine whether multiple current selections overlap
Returns
boolean
Deprecated
this should be extracted to an pure function
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:141
setSelections()
setSelections(selectionDatas, type)
setSelections(selectionDatas, type?): void
Set selection data to WorkbookSelectionModel. If type is not specified, this method would clear all existing selections.
Parameters
Parameter | Type |
---|---|
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:105
setSelections(unitId, worksheetId, selectionDatas, type)
setSelections(
unitId,
worksheetId,
selectionDatas,
type?): void
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:106