MCPcopy Create free account
hub / github.com/BruceDevices/firmware / drawCanvasLoading

Function drawCanvasLoading

embedded_resources/web_interface/index.js:880–902  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

878 }
879}
880function drawCanvasLoading() {
881 if (loadingDrawn || !showNavigating) return;
882 loadingDrawn = true;
883 const canvas = $("#navigator-screen");
884 const ctx = canvas.getContext("2d");
885 const width = canvas.width;
886 const height = canvas.height;
887
888 // Draw semi-transparent black background
889 ctx.save();
890 ctx.globalAlpha = 0.8;
891 ctx.fillStyle = "#000";
892 ctx.fillRect(0, 0, width, height);
893 ctx.globalAlpha = 1.0;
894
895 // Draw "Loading" text in the center
896 ctx.fillStyle = "#fff";
897 ctx.font = "bold 14px 'DejaVu Sans Mono', Consolas, Menlo";
898 ctx.textAlign = "center";
899 ctx.textBaseline = "middle";
900 ctx.fillText("Navigating...", width / 2, height / 2);
901 ctx.restore();
902}
903
904let oldTimerSession = sessionStorage.getItem("autoReload") || "0";
905eConfigAutoReload.querySelector(`option[value="${oldTimerSession}"]`).selected =

Callers 2

runNavigationFunction · 0.85
index.jsFile · 0.85

Calls 3

$Function · 0.85
saveMethod · 0.45
fillRectMethod · 0.45

Tested by

no test coverage detected