@univerjsdocsclassesDocselectionmanagerservice

@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

ParameterType
_commandServiceICommandService
_univerInstanceServiceIUniverInstanceService

Returns

DocSelectionManagerService

Overrides

RxDisposable.constructor

Defined in

docs/src/services/doc-selection-manager.service.ts:60

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedcore/src/shared/lifecycle.ts:93
dispose$protectedSubject<void>undefinedRxDisposable.dispose$core/src/shared/lifecycle.ts:117
refreshSelection$readonlyObservable<Nullable<IRefreshSelectionParam>>undefined-docs/src/services/doc-selection-manager.service.ts:58
textSelection$readonlyObservable<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

ParameterType
textSelectionInfoIDocSelectionInnerParam
searchIDocSelectionManagerSearchParam

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:225


__TEST_ONLY_add()

__TEST_ONLY_add(textRanges, isEditing): void

Parameters

ParameterTypeDefault value
textRangesITextRangeWithStyle[]undefined
isEditingbooleantrue

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:168


__TEST_ONLY_setCurrentSelection()

__TEST_ONLY_setCurrentSelection(param): void

Parameters

ParameterType
paramIDocSelectionManagerSearchParam

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:103


dispose()

dispose(): void

Returns

void

Overrides

RxDisposable.dispose

Defined in

docs/src/services/doc-selection-manager.service.ts:266


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe

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

Nullable<ITextRangeWithStyle>

Deprecated

Defined in

docs/src/services/doc-selection-manager.service.ts:157


getActiveTextRange()

getActiveTextRange(): Nullable<ITextRangeWithStyle>

Returns

Nullable<ITextRangeWithStyle>

Defined in

docs/src/services/doc-selection-manager.service.ts:142


getDocRanges()

getDocRanges(params): ITextRangeWithStyle[]

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

ITextRangeWithStyle[]

Defined in

docs/src/services/doc-selection-manager.service.ts:121


getRectRanges()

getRectRanges(params): Readonly<Nullable<IRectRangeWithStyle[]>>

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

Readonly<Nullable<IRectRangeWithStyle[]>>

Defined in

docs/src/services/doc-selection-manager.service.ts:115


getSelectionInfo()

getSelectionInfo(params): undefined | IDocSelectionInnerParam

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

undefined | IDocSelectionInnerParam

Defined in

docs/src/services/doc-selection-manager.service.ts:90


getTextRanges()

getTextRanges(params): Readonly<Nullable<ITextRangeWithStyle[]>>

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

Readonly<Nullable<ITextRangeWithStyle[]>>

Defined in

docs/src/services/doc-selection-manager.service.ts:109


refreshSelection()

refreshSelection(params): void

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:94


replaceDocRanges()

replaceDocRanges(
   docRanges, 
   params, 
   isEditing, 
   options?): void

Parameters

ParameterTypeDefault value
docRangesISuccinctDocRangeParam[]undefined
paramsNullable<IDocSelectionManagerSearchParam>...
isEditingbooleantrue
options?objectundefined

Returns

void

Defined in

docs/src/services/doc-selection-manager.service.ts:201


replaceTextRanges()

replaceTextRanges(
   docRanges, 
   isEditing, 
   options?): void

Parameters

ParameterTypeDefault value
docRangesISuccinctDocRangeParam[]undefined
isEditingbooleantrue
options?objectundefined

Returns

void

Deprecated

pls use replaceDocRanges.

Defined in

docs/src/services/doc-selection-manager.service.ts:188