@mkerkstra/jsts-cjs
Version:
A CommonJS fork of JSTS: A JavaScript library of spatial predicates and functions for processing geometry
19 lines (18 loc) • 543 B
JavaScript
import IntervalRTreeNode from './IntervalRTreeNode.js'
export default class IntervalRTreeLeafNode extends IntervalRTreeNode {
constructor() {
super()
IntervalRTreeLeafNode.constructor_.apply(this, arguments)
}
static constructor_() {
this._item = null
const min = arguments[0], max = arguments[1], item = arguments[2]
this._min = min
this._max = max
this._item = item
}
query(queryMin, queryMax, visitor) {
if (!this.intersects(queryMin, queryMax)) return null
visitor.visitItem(this._item)
}
}