@univerjs/docs v0.5.0-beta.1 • Docs
Class: DocSelectionManagerService
This service is for text selection.
Extends
Constructors
new DocSelectionManagerService()
new DocSelectionManagerService(_commandService, _univerInstanceService): DocSelectionManagerService
Parameters
Parameter | Type |
---|---|
_commandService | ICommandService |
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Defined in
docs/src/services/doc-selection-manager.service.ts:60
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | RxDisposable ._disposed | core/src/shared/lifecycle.ts:93 |
dispose$ | protected | Subject <void > | undefined | RxDisposable .dispose$ | core/src/shared/lifecycle.ts:117 |
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>
Returns
Nullable
<IDocSelectionManagerSearchParam
>
Defined in
docs/src/services/doc-selection-manager.service.ts:86
__replaceTextRangesWithNoRefresh()
__replaceTextRangesWithNoRefresh(textSelectionInfo, search): void
Parameters
Parameter | Type |
---|---|
textSelectionInfo | IDocSelectionInnerParam |
search | IDocSelectionManagerSearchParam |
Returns
void
Defined in
docs/src/services/doc-selection-manager.service.ts:225
__TEST_ONLY_add()
__TEST_ONLY_add(textRanges, isEditing): void
Parameters
Parameter | Type | Default value |
---|---|---|
textRanges | ITextRangeWithStyle [] | undefined |
isEditing | boolean | true |
Returns
void
Defined in
docs/src/services/doc-selection-manager.service.ts:168
__TEST_ONLY_setCurrentSelection()
__TEST_ONLY_setCurrentSelection(param): void
Parameters
Parameter | Type |
---|---|
param | IDocSelectionManagerSearchParam |
Returns
void
Defined in
docs/src/services/doc-selection-manager.service.ts:103
dispose()
dispose(): void
Returns
void
Overrides
Defined in
docs/src/services/doc-selection-manager.service.ts:266
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
RxDisposable
.ensureNotDisposed
Defined in
core/src/shared/lifecycle.ts:100
getActiveRectRange()
getActiveRectRange(): Nullable<ITextRangeWithStyle>
Returns
Deprecated
Defined in
docs/src/services/doc-selection-manager.service.ts:157
getActiveTextRange()
getActiveTextRange(): Nullable<ITextRangeWithStyle>
Returns
Defined in
docs/src/services/doc-selection-manager.service.ts:142
getDocRanges()
getDocRanges(params): ITextRangeWithStyle[]
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
Defined in
docs/src/services/doc-selection-manager.service.ts:121
getRectRanges()
getRectRanges(params): Readonly<Nullable<IRectRangeWithStyle[]>>
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
Readonly
<Nullable
<IRectRangeWithStyle
[]>>
Defined in
docs/src/services/doc-selection-manager.service.ts:115
getSelectionInfo()
getSelectionInfo(params): undefined | IDocSelectionInnerParam
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
undefined
| IDocSelectionInnerParam
Defined in
docs/src/services/doc-selection-manager.service.ts:90
getTextRanges()
getTextRanges(params): Readonly<Nullable<ITextRangeWithStyle[]>>
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
Readonly
<Nullable
<ITextRangeWithStyle
[]>>
Defined in
docs/src/services/doc-selection-manager.service.ts:109
refreshSelection()
refreshSelection(params): void
Parameters
Parameter | Type |
---|---|
params | Nullable <IDocSelectionManagerSearchParam > |
Returns
void
Defined in
docs/src/services/doc-selection-manager.service.ts:94
replaceDocRanges()
replaceDocRanges(
docRanges,
params,
isEditing,
options?): void
Parameters
Parameter | Type | Default value |
---|---|---|
docRanges | ISuccinctDocRangeParam [] | undefined |
params | Nullable <IDocSelectionManagerSearchParam > | ... |
isEditing | boolean | true |
options ? | object | undefined |
Returns
void
Defined in
docs/src/services/doc-selection-manager.service.ts:201
replaceTextRanges()
replaceTextRanges(
docRanges,
isEditing,
options?): void
Parameters
Parameter | Type | Default value |
---|---|---|
docRanges | ISuccinctDocRangeParam [] | undefined |
isEditing | boolean | true |
options ? | object | undefined |
Returns
void
Deprecated
pls use replaceDocRanges.
Defined in
docs/src/services/doc-selection-manager.service.ts:188