(node: Node<T>, offset: number)
| 451 | } |
| 452 | |
| 453 | protected isValid(node: Node<T>, offset: number): boolean { |
| 454 | let cached = this.layoutNodes.get(node.key); |
| 455 | let offsetProperty = this.orientation === 'horizontal' ? 'x' : 'y'; |
| 456 | return ( |
| 457 | !this.invalidateEverything && |
| 458 | !!cached && |
| 459 | cached.node === node && |
| 460 | offset === cached.layoutInfo.rect[offsetProperty] && |
| 461 | cached.layoutInfo.rect.intersects(this.validRect) && |
| 462 | cached.validRect.containsRect(cached.layoutInfo.rect.intersection(this.requestedRect)) |
| 463 | ); |
| 464 | } |
| 465 | |
| 466 | protected buildChild(node: Node<T>, x: number, y: number, parentKey: Key | null): LayoutNode { |
| 467 | if (this.isValid(node, this.orientation === 'horizontal' ? x : y)) { |
no test coverage detected