@univerjs/sheets v0.4.2 • 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:56 (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:48 (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:185 (opens in a new tab)
_getCurrentSelections()
protected _getCurrentSelections(): ISelectionWithStyle[]
Returns
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:170 (opens in a new tab)
_init()
protected _init(): void
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:63 (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:200 (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:92 (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:93 (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:79 (opens in a new tab)
clearCurrentSelections()
clearCurrentSelections(): void
Returns
void
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:139 (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()
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:87 (opens in a new tab)
getCurrentSelections()
getCurrentSelections(): readonly ISelectionWithStyle[]
Returns
readonly ISelectionWithStyle
[]
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:83 (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:180 (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:149 (opens in a new tab)
setSelections()
Set selection data to WorkbookSelections. If type is not specified, this method would clear all existing selections.
Param
Param
Param
Param
setSelections(selectionDatas, type)
setSelections(selectionDatas, type?): void
Set selection data to WorkbookSelections. If type is not specified, 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:109 (opens in a new tab)
setSelections(unitId, worksheetId, selectionDatas, type)
setSelections(
unitId,
worksheetId,
selectionDatas,
type?): void
Set selection data to WorkbookSelections. If type is not specified, 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:110 (opens in a new tab)