Class: DocSelectionManagerService
Defined in: docs/src/services/doc-selection-manager.service.ts:49
This service is for text selection.
Extends
Constructors
new DocSelectionManagerService()
new DocSelectionManagerService(_commandService, _univerInstanceService): DocSelectionManagerService
Defined in: docs/src/services/doc-selection-manager.service.ts:60
Parameters
Parameter | Type |
---|---|
_commandService | ICommandService |
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | RxDisposable ._disposed | core/src/shared/lifecycle.ts:96 |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | core/src/shared/lifecycle.ts:120 |
refreshSelection$ | readonly | Observable <Nullable <IRefreshSelectionParam >> | undefined | - | docs/src/services/doc-selection-manager.service.ts:58 |
textSelection$ | readonly | Observable <ITextSelectionManagerInsertParam > | undefined | - | docs/src/services/doc-selection-manager.service.ts:55 |
Methods
__getCurrentSelection()
__getCurrentSelection(): Nullable<IDocSelectionManagerSearchParam>
Defined in: docs/src/services/doc-selection-manager.service.ts:86
Returns
Nullable
<IDocSelectionManagerSearchParam
>
__replaceTextRangesWithNoRefresh()
__replaceTextRangesWithNoRefresh(textSelectionInfo, search): void
Defined in: docs/src/services/doc-selection-manager.service.ts:225
Parameters
Parameter | Type |
---|---|
textSelectionInfo | IDocSelectionInnerParam |
search | IDocSelectionManagerSearchParam |
Returns
void
__TEST_ONLY_add()
__TEST_ONLY_add(textRanges, isEditing): void
Defined in: docs/src/services/doc-selection-manager.service.ts:168
Parameters
Parameter | Type | Default value |
---|---|---|
textRanges | ITextRangeWithStyle [] | undefined |
isEditing | boolean | true |
Returns
void
__TEST_ONLY_setCurrentSelection()
__TEST_ONLY_setCurrentSelection(param): void
Defined in: docs/src/services/doc-selection-manager.service.ts:103
Parameters
Parameter | Type |
---|---|
param | IDocSelectionManagerSearchParam |
Returns
void
dispose()
dispose(): void
Defined in: docs/src/services/doc-selection-manager.service.ts:266
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
getActiveRectRange()
getActiveRectRange(): Nullable<ITextRangeWithStyle>
Defined in: docs/src/services/doc-selection-manager.service.ts:157
Returns
Deprecated
getActiveTextRange()
getActiveTextRange(): Nullable<ITextRangeWithStyle>
Defined in: docs/src/services/doc-selection-manager.service.ts:142
Returns
getDocRanges()
getDocRanges(params): ITextRangeWithStyle[]
Defined in: docs/src/services/doc-selection-manager.service.ts:121
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
getRectRanges()
getRectRanges(params): Readonly<Nullable<IRectRangeWithStyle[]>>
Defined in: docs/src/services/doc-selection-manager.service.ts:115
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
Readonly
<Nullable
<IRectRangeWithStyle
[]>>
getSelectionInfo()
getSelectionInfo(params):
| undefined
| IDocSelectionInnerParam
Defined in: docs/src/services/doc-selection-manager.service.ts:90
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
| undefined
| IDocSelectionInnerParam
getTextRanges()
getTextRanges(params): Readonly<Nullable<ITextRangeWithStyle[]>>
Defined in: docs/src/services/doc-selection-manager.service.ts:109
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
Readonly
<Nullable
<ITextRangeWithStyle
[]>>
refreshSelection()
refreshSelection(params): void
Defined in: docs/src/services/doc-selection-manager.service.ts:94
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
void
replaceDocRanges()
replaceDocRanges(
docRanges,
params,
isEditing,
options?): void
Defined in: docs/src/services/doc-selection-manager.service.ts:201
Parameters
Parameter | Type | Default value |
---|---|---|
docRanges | ISuccinctDocRangeParam [] | undefined |
params | Nullable <IDocSelectionManagerSearchParam > | ... |
isEditing | boolean | true |
options ? | {} | undefined |
Returns
void
replaceTextRanges()
replaceTextRanges(
docRanges,
isEditing,
options?): void
Defined in: docs/src/services/doc-selection-manager.service.ts:188
Parameters
Parameter | Type | Default value |
---|---|---|
docRanges | ISuccinctDocRangeParam [] | undefined |
isEditing | boolean | true |
options ? | {} | undefined |
Returns
void
Deprecated
pls use replaceDocRanges.