@univerjs/sheets v0.2.11 • Docs
Class: SheetsSelectionsService
Extends
Extended by
Constructors
new SheetsSelectionsService()
new SheetsSelectionsService(_instanceSrv): SheetsSelectionsService
Parameters
Parameter | Type |
---|---|
_instanceSrv | IUniverInstanceService |
Returns
Overrides
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:52 (opens in a new tab)
Properties
Accessors
currentSelectionParam
get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>
Returns
Nullable
<ISelectionManagerSearchParam
>
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:44 (opens in a new tab)
Methods
_ensureWorkbookSelection()
protected _ensureWorkbookSelection(unitId): WorkbookSelections
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:181 (opens in a new tab)
_getCurrentSelections()
protected _getCurrentSelections(): ISelectionWithStyle[]
Returns
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:166 (opens in a new tab)
_init()
protected _init(): void
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:59 (opens in a new tab)
_removeWorkbookSelection()
protected _removeWorkbookSelection(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:196 (opens in a new tab)
addSelections()
addSelections(selectionsData)
addSelections(selectionsData): void
Parameters
Parameter | Type |
---|---|
selectionsData | ISelectionWithStyle [] |
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:88 (opens in a new tab)
addSelections(unitId, worksheetId, selectionDatas)
addSelections(
unitId,
worksheetId,
selectionDatas): void
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:89 (opens in a new tab)
clear()
clear(): void
Clear all selections in all workbooks. invoked by prompt.controller
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:75 (opens in a new tab)
clearCurrentSelections()
clearCurrentSelections(): void
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:135 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:119 (opens in a new tab)
disposeWithMe()
protected disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getCurrentLastSelection()
getCurrentLastSelection(): DeepReadonly<Nullable<ISelectionWithStyle & {
primary: ISelectionCell;
}>>
Returns
DeepReadonly
<Nullable
<ISelectionWithStyle
& {
primary
: ISelectionCell
;
}>>
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:83 (opens in a new tab)
getCurrentSelections()
getCurrentSelections(): readonly ISelectionWithStyle[]
Returns
readonly ISelectionWithStyle
[]
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:79 (opens in a new tab)
getWorkbookSelections()
getWorkbookSelections(unitId): WorkbookSelections
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:176 (opens in a new tab)
isOverlapping()
isOverlapping(): boolean
Determine whether multiple current selections overlap
Returns
boolean
Deprecated
this should be extracted to an pure function
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:145 (opens in a new tab)
setSelections()
Set seleciton data to WorkbookSelections. If type is not specfied, this method would clear all existing selections.
Param
Param
Param
Param
setSelections(selectionDatas, type)
setSelections(selectionDatas, type?): void
Set seleciton data to WorkbookSelections. If type is not specfied, this method would clear all existing selections.
Parameters
Parameter | Type |
---|---|
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Param
Param
Param
Param
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:105 (opens in a new tab)
setSelections(unitId, worksheetId, selectionDatas, type)
setSelections(
unitId,
worksheetId,
selectionDatas,
type?): void
Set seleciton data to WorkbookSelections. If type is not specfied, this method would clear all existing selections.
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Param
Param
Param
Param
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:106 (opens in a new tab)