@univerjs/core v0.4.2 • Docs
Class: RTree
Constructors
new RTree()
new RTree(_enableOneCellCache): RTree
Parameters
Parameter | Type | Default value |
---|---|---|
_enableOneCellCache | boolean | false |
Returns
Defined in
submodules/univer/packages/core/src/shared/r-tree.ts:54 (opens in a new tab)
Methods
bulkInsert()
bulkInsert(items): void
Parameters
Parameter | Type |
---|---|
items | IRTreeItem [] |
Returns
void
Defined in
submodules/univer/packages/core/src/shared/r-tree.ts:220 (opens in a new tab)
bulkRemove()
bulkRemove(searchList): void
Parameters
Parameter | Type |
---|---|
searchList | IRTreeItem [] |
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
Parameter | Type |
---|---|
searchList | IUnitRange [] |
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
Parameter | Type |
---|---|
data | IRTreeData |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
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
Parameter | Type |
---|---|
item | IRTreeItem |
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
Parameter | Type |
---|---|
search | IRTreeItem |
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
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
search | IUnitRange |
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)