succd: scale down canvas to fit narrow screens
This commit is contained in:
parent
9e02f07b90
commit
73bce8d5ee
|
@ -51,7 +51,7 @@ h2 {
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-top: 2em;">
|
<p style="margin-top: 2em;">
|
||||||
<canvas id="graph" width="1024" height="512"></canvas>
|
<canvas id="graph" width="1024" height="512" style="max-width: 100%;"></canvas>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="font-style: italic; font-size: 12px; margin-top: 5em;">
|
<p style="font-style: italic; font-size: 12px; margin-top: 5em;">
|
||||||
|
@ -199,7 +199,7 @@ window.addEventListener("load", (_) => {
|
||||||
let ping = document.querySelector("#ping");
|
let ping = document.querySelector("#ping");
|
||||||
canvas = document.querySelector("#graph").getContext("2d");
|
canvas = document.querySelector("#graph").getContext("2d");
|
||||||
|
|
||||||
// TODO(q3k): unhardcode this and generally support scaling canvas.
|
// TODO(q3k): unhardcode this.
|
||||||
historicalDraw(1024, 512);
|
historicalDraw(1024, 512);
|
||||||
|
|
||||||
// Basic retry loop for connecting to WS.
|
// Basic retry loop for connecting to WS.
|
||||||
|
|
Loading…
Reference in a new issue