()
| 439 | let cachedContext: CanvasRenderingContext2D | null = null; |
| 440 | |
| 441 | const getCanvasContext = () => { |
| 442 | if (cachedContext) { |
| 443 | return cachedContext; |
| 444 | } |
| 445 | |
| 446 | const canvas = document.createElement('canvas'); |
| 447 | cachedContext = canvas.getContext('2d'); |
| 448 | |
| 449 | return cachedContext; |
| 450 | }; |
| 451 | |
| 452 | export const getLabelSizeWeb = (ref: MutableRefObject<HTMLElement | null>) => { |
| 453 | if (Platform.OS !== 'web' || ref.current === null) { |
no outgoing calls
no test coverage detected
searching dependent graphs…