MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / redraw

Function redraw

src/Components/WorldMap/display.js:257–269  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

255}
256
257function redraw(mode) {
258 cancelAnimationFrame(animationId);
259
260 ctx.clearRect(0, 0, canvas.width, canvas.height);
261
262 if (mode === 'light') {
263 lightModeRedraw();
264 } else {
265 darkModeRedraw();
266 }
267
268 animationId = requestAnimationFrame(redraw.bind(null, mode));
269}
270
271function initCanvas(container) {
272 const devicePixelRatio = window.devicePixelRatio || 1;

Callers 1

initMapFunction · 0.85

Calls 2

lightModeRedrawFunction · 0.85
darkModeRedrawFunction · 0.85

Tested by

no test coverage detected