Skip to content

Class: default

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new default(maxEntries?): default

Parameters

NameTypeDefault value
maxEntriesnumber9

Returns

default

Defined in

index.ts:153

Properties

data

data: NodeItem

Defined in

index.ts:151

Methods

all

all(): NodeItem[]

Returns

NodeItem[]

Defined in

index.ts:160


search(bbox, options?): NodeItem[]

Parameters

NameType
bboxBBoxLike
options?ICOptions

Returns

NodeItem[]

Defined in

index.ts:164


collides

collides(bbox, options?): boolean

Parameters

NameType
bboxBBoxLike
options?ICOptions

Returns

boolean

Defined in

index.ts:192


load

load(data): default

Parameters

NameType
dataany[]

Returns

default

Defined in

index.ts:216


insert

insert(item?): default

Parameters

NameType
item?NodeItem

Returns

default

Defined in

index.ts:250


clear

clear(): default

Returns

default

Defined in

index.ts:255


remove

remove(item?, equalsFn?): default

Parameters

NameType
item?NodeItem
equalsFn?IEqualsFn

Returns

default

Defined in

index.ts:260


toBBox

toBBox(item): BBoxLike

Parameters

NameType
itemNodeItem

Returns

BBoxLike

Defined in

index.ts:310


compareMinX

compareMinX(a, b): number

Parameters

NameType
aNodeItem
bNodeItem

Returns

number

Defined in

index.ts:314


compareMinY

compareMinY(a, b): number

Parameters

NameType
aNodeItem
bNodeItem

Returns

number

Defined in

index.ts:317


toJSON

toJSON(): NodeItem

Returns

NodeItem

Defined in

index.ts:321


fromJSON

fromJSON(data): default

Parameters

NameType
dataNodeItem

Returns

default

Defined in

index.ts:325


_all

_all(node, result?): NodeItem[]

Parameters

NameTypeDefault value
nodeNodeItemundefined
resultNodeItem[][]

Returns

NodeItem[]

Defined in

index.ts:330


_build

_build(items, left, right, h): any

Parameters

NameType
itemsNodeItem[]
leftnumber
rightnumber
hnumber

Returns

any

Defined in

index.ts:342


_chooseSubtree

_chooseSubtree(bbox, n, level, path): NodeItem

Parameters

NameType
bboxBBoxLike
nNodeItem
levelnumber
pathNodeItem[]

Returns

NodeItem

Defined in

index.ts:392


_insert

_insert(item, level, isNode?): void

Parameters

NameType
itemNodeItem
levelnumber
isNode?boolean

Returns

void

Defined in

index.ts:429


_split

_split(insertPath, level): void

Parameters

NameType
insertPathNodeItem[]
levelnumber

Returns

void

Defined in

index.ts:454


_splitRoot

_splitRoot(node, newNode): void

Parameters

NameType
nodeNodeItem
newNodeNodeItem

Returns

void

Defined in

index.ts:474


_chooseSplitIndex

_chooseSplitIndex(node, m, M): any

Parameters

NameType
nodeNodeItem
mnumber
Mnumber

Returns

any

Defined in

index.ts:482


_chooseSplitAxis

_chooseSplitAxis(node, m, M): void

Parameters

NameType
nodeNodeItem
mnumber
Mnumber

Returns

void

Defined in

index.ts:513


_allDistMargin

_allDistMargin(node, m, M, compare): number

Parameters

NameType
nodeNodeItem
mnumber
Mnumber
compareICompare

Returns

number

Defined in

index.ts:525


_adjustParentBBoxes

_adjustParentBBoxes(bbox, path, level): void

Parameters

NameType
bboxBBoxLike
pathNodeItem[]
levelnumber

Returns

void

Defined in

index.ts:548


_condense

_condense(path): void

Parameters

NameType
pathNodeItem[]

Returns

void

Defined in

index.ts:555

Released under the MIT License.