API Reference
@univerjs
@univerjs/core
classes
Rtree

@univerjs/core v0.4.2Docs


Class: RTree

Constructors

new RTree()

new RTree(_enableOneCellCache): RTree

Parameters

ParameterTypeDefault value
_enableOneCellCachebooleanfalse

Returns

RTree

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:54 (opens in a new tab)

Methods

bulkInsert()

bulkInsert(items): void

Parameters

ParameterType
itemsIRTreeItem[]

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:220 (opens in a new tab)


bulkRemove()

bulkRemove(searchList): void

Parameters

ParameterType
searchListIRTreeItem[]

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:291 (opens in a new tab)


bulkSearch()

bulkSearch(searchList): Set<StringOrNumber>

Parameters

ParameterType
searchListIUnitRange[]

Returns

Set<StringOrNumber>

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:257 (opens in a new tab)


clear()

clear(): void

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:297 (opens in a new tab)


closeKdTree()

closeKdTree(): void

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:173 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:58 (opens in a new tab)


fromJSON()

fromJSON(data): void

Parameters

ParameterType
dataIRTreeData

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:314 (opens in a new tab)


getTree()

getTree(unitId, subUnitId): RBush<IRBushItem>

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

RBush<IRBushItem>

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:62 (opens in a new tab)


insert()

insert(item): void

Parameters

ParameterType
itemIRTreeItem

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:182 (opens in a new tab)


openKdTree()

openKdTree(): void

Open the kd-tree search state. The kd-tree is used to search for data in a single cell.

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:152 (opens in a new tab)


remove()

remove(search): void

Parameters

ParameterType
searchIRTreeItem

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:278 (opens in a new tab)


removeById()

removeById(unitId, subUnitId?): void

Parameters

ParameterType
unitIdstring
subUnitId?string

Returns

void

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:268 (opens in a new tab)


search()

search(search): StringOrNumber[]

Parameters

ParameterType
searchIUnitRange

Returns

StringOrNumber[]

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:226 (opens in a new tab)


toJSON()

toJSON(): IRTreeData

Returns

IRTreeData

Defined in

submodules/univer/packages/core/src/shared/r-tree.ts:302 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.