()
| 125 | } |
| 126 | |
| 127 | private haveRectsChanged(): boolean { |
| 128 | if (this._lastSizes.length) { |
| 129 | const newRects = this.rects(); |
| 130 | if (newRects.length === this._lastSizes.length) { |
| 131 | for (let i = 0; i < newRects.length; i++) { |
| 132 | if (!this.isSameRect(newRects[i], this._lastSizes[i])) { |
| 133 | return true; |
| 134 | } |
| 135 | } |
| 136 | } else { |
| 137 | return true; |
| 138 | } |
| 139 | } |
| 140 | return false; |
| 141 | } |
| 142 | |
| 143 | private isSameRect(rect1: Rect, rect2: Rect): boolean { |
| 144 | const si = (a: number, b: number) => Math.round(a) === Math.round(b); |
no test coverage detected