MCPcopy Index your code
hub / github.com/rough-stuff/rough-notation / haveRectsChanged

Method haveRectsChanged

src/rough-notation.ts:127–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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);

Callers 1

RoughAnnotationImplClass · 0.95

Calls 2

rectsMethod · 0.95
isSameRectMethod · 0.95

Tested by

no test coverage detected