(node: Node<T>, offset: number)
| 644 | } |
| 645 | |
| 646 | protected isValid(node: Node<T>, offset: number): boolean { |
| 647 | let cached = this.layoutNodes.get(node.key); |
| 648 | let offsetProperty = this.orientation === 'horizontal' ? 'x' : 'y'; |
| 649 | return ( |
| 650 | !this.invalidateEverything && |
| 651 | !!cached && |
| 652 | cached.node === node && |
| 653 | offset === cached.layoutInfo.rect[offsetProperty] && |
| 654 | cached.layoutInfo.rect.intersects(this.validRect) && |
| 655 | cached.validRect.containsRect(cached.layoutInfo.rect.intersection(this.requestedRect)) |
| 656 | ); |
| 657 | } |
| 658 | |
| 659 | protected buildChild(node: Node<T>, x: number, y: number, parentKey: Key | null): LayoutNode { |
| 660 | if (this.isValid(node, this.orientation === 'horizontal' ? x : y)) { |
no test coverage detected