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

Function initCanvas

src/Components/WorldMap/display.js:271–278  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

269}
270
271function initCanvas(container) {
272 const devicePixelRatio = window.devicePixelRatio || 1;
273 container.width = width * devicePixelRatio;
274 container.height = height * devicePixelRatio;
275 container.style.width = `${width}px`;
276 container.style.height = `${height}px`;
277 container.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
278}
279
280export function initMap(staticContainer, dynamicContainer, mapWidth, mapHeight, mode) {
281 if (animationId !== null) {

Callers 1

initMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected