@univerjsdocsclassesDocselectionmanagerservice

@univerjs/docs v0.5.4


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

ParameterType
_commandServiceICommandService
_univerInstanceServiceIUniverInstanceService

Returns

DocSelectionManagerService

Overrides

RxDisposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedcore/src/shared/lifecycle.ts:96
dispose$protectedSubject<void>undefinedRxDisposable.dispose$core/src/shared/lifecycle.ts:120
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>

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

ParameterType
textSelectionInfoIDocSelectionInnerParam
searchIDocSelectionManagerSearchParam

Returns

void


__TEST_ONLY_add()

__TEST_ONLY_add(textRanges, isEditing): void

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

Parameters

ParameterTypeDefault value
textRangesITextRangeWithStyle[]undefined
isEditingbooleantrue

Returns

void


__TEST_ONLY_setCurrentSelection()

__TEST_ONLY_setCurrentSelection(param): void

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

Parameters

ParameterType
paramIDocSelectionManagerSearchParam

Returns

void


dispose()

dispose(): void

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

Returns

void

Overrides

RxDisposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe


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

Nullable<ITextRangeWithStyle>

Deprecated


getActiveTextRange()

getActiveTextRange(): Nullable<ITextRangeWithStyle>

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

Returns

Nullable<ITextRangeWithStyle>


getDocRanges()

getDocRanges(params): ITextRangeWithStyle[]

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

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

ITextRangeWithStyle[]


getRectRanges()

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

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

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

Readonly<Nullable<IRectRangeWithStyle[]>>


getSelectionInfo()

getSelectionInfo(params): 
  | undefined
  | IDocSelectionInnerParam

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

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

| undefined | IDocSelectionInnerParam


getTextRanges()

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

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

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

Readonly<Nullable<ITextRangeWithStyle[]>>


refreshSelection()

refreshSelection(params): void

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

Parameters

ParameterType
paramsNullable<IDocSelectionManagerSearchParam>

Returns

void


replaceDocRanges()

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

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

Parameters

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

Returns

void


replaceTextRanges()

replaceTextRanges(
   docRanges, 
   isEditing, 
   options?): void

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

Parameters

ParameterTypeDefault value
docRangesISuccinctDocRangeParam[]undefined
isEditingbooleantrue
options?{}undefined

Returns

void

Deprecated

pls use replaceDocRanges.