fix the zoom

This commit is contained in:
Luca Conte 2025-02-17 15:06:43 +01:00
parent eb0bc9d9b9
commit 02502bf4e9
2 changed files with 13 additions and 3 deletions

View File

@ -15,7 +15,7 @@ function draw() {
// draw connections // draw connections
c.strokeStyle = "white"; c.strokeStyle = "white";
c.lineWidth = 3; c.lineWidth = 3 * Camera.zoom;
for (let box of Box.instances) { for (let box of Box.instances) {
for (let input of box.inputs) { for (let input of box.inputs) {

View File

@ -50,8 +50,9 @@ body {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: none; overflow: none;
zoom: var(--zoom); transform: scale(var(--zoom));
font-size: calc(1em * var(--zoom)); transform-origin: top left;
/* font-size: calc(1em * var(--zoom));*/
} }
@ -132,6 +133,15 @@ textarea {
min-width: 200px; min-width: 200px;
} }
/*#playground input,
#playground textarea,
#playground select,
#playground button,
#playground .connectorLabel,
#playground .boxTitle {
scale: var(--zoom);
}*/
.boxConnectorContainer { .boxConnectorContainer {
display: flex; display: flex;
flex-direction: row; flex-direction: row;