Plot from PiPedalUI

This commit is contained in:
Robin E. R. Davies
2025-09-19 07:27:33 -04:00
parent 9c18f7ab7c
commit eeb525dc71
11 changed files with 237 additions and 199 deletions
+4 -4
View File
@@ -75,15 +75,15 @@ export default class SnapshotButton extends ResizeResponsiveComponent<SnapshotBu
if (this.is2x3Layout(width,height)) {
uiScale = width / 400;
} else {
uiScale = (width/3)/(400/2);
uiScale = (width/3)/(400/2)*1.5;
}
if (height < width) {
// 1 at 400, 2 at 600
let hUiScale = (height-340)/(400-340);
hUiScale += (height-400)/(460-400);
let hUiScale = (height-200)/(400-200);
hUiScale += 1;
uiScale = Math.min(hUiScale,uiScale);
}
if (uiScale < 1) uiScale = 1;
if (uiScale < 1.3) uiScale = 1.3;
if (uiScale > 4) uiScale = 4;
this.setState({uiScale: uiScale});
}