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

Method rects

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

Source from the content-addressed store, hash-verified

225 }
226
227 private rects(): Rect[] {
228 const ret: Rect[] = [];
229 if (this._svg) {
230 if (this._config.multiline) {
231 const elementRects = this._e.getClientRects();
232 for (let i = 0; i < elementRects.length; i++) {
233 ret.push(this.svgRect(this._svg, elementRects[i]));
234 }
235 } else {
236 ret.push(this.svgRect(this._svg, this._e.getBoundingClientRect()));
237 }
238 }
239 return ret;
240 }
241
242 private svgRect(svg: SVGSVGElement, bounds: DOMRect | DOMRectReadOnly): Rect {
243 const rect1 = svg.getBoundingClientRect();

Callers 2

haveRectsChangedMethod · 0.95
renderMethod · 0.95

Calls 1

svgRectMethod · 0.95

Tested by

no test coverage detected