MCPcopy Create free account
hub / github.com/callstack/react-native-paper / getCanvasContext

Function getCanvasContext

src/components/FAB/utils.ts:441–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439let cachedContext: CanvasRenderingContext2D | null = null;
440
441const 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
452export const getLabelSizeWeb = (ref: MutableRefObject<HTMLElement | null>) => {
453 if (Platform.OS !== 'web' || ref.current === null) {

Callers 1

getLabelSizeWebFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…