(node: Node<T>, offset: number)
| 668 | } |
| 669 | |
| 670 | protected isValid(node: Node<T>, offset: number): boolean { |
| 671 | let cached = this.layoutNodes.get(node.key); |
| 672 | let offsetProperty = this.orientation === 'horizontal' ? 'x' : 'y'; |
| 673 | return ( |
| 674 | !this.invalidateEverything && |
| 675 | !!cached && |
| 676 | cached.node === node && |
| 677 | offset === cached.layoutInfo.rect[offsetProperty] && |
| 678 | cached.layoutInfo.rect.intersects(this.validRect) && |
| 679 | cached.validRect.containsRect(cached.layoutInfo.rect.intersection(this.requestedRect)) |
| 680 | ); |
| 681 | } |
| 682 | |
| 683 | protected buildChild(node: Node<T>, x: number, y: number, parentKey: Key | null): LayoutNode { |
| 684 | if (this.isValid(node, this.orientation === 'horizontal' ? x : y)) { |
no test coverage detected