()
| 214 | ctxRef.current = canvas.getContext('2d'); |
| 215 | |
| 216 | function setSize() { |
| 217 | if (!container || !canvas) return; |
| 218 | const rect = container.getBoundingClientRect(); |
| 219 | boundingRef.current = { |
| 220 | width: rect.width, |
| 221 | height: rect.height, |
| 222 | left: rect.left, |
| 223 | top: rect.top |
| 224 | }; |
| 225 | canvas.width = rect.width; |
| 226 | canvas.height = rect.height; |
| 227 | } |
| 228 | |
| 229 | function setLines() { |
| 230 | const { width, height } = boundingRef.current; |
no outgoing calls
no test coverage detected