Fix zoom.js

Fixes for mistakes i really should've found sooner
This commit is contained in:
Mnem42 2025-11-05 18:50:52 +00:00 committed by GitHub
parent 7f7771045c
commit 79de216008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,7 @@
6,
12
]
window.zoom_data_div = null
window.zoom_level = 1
window.zoom_panning = [0,0]
@ -59,6 +60,8 @@
const x_pan = (-zoom_panning[0]).toString().padEnd(4)
const y_pan = (-zoom_panning[1]).toString().padEnd(4)
if (zoom_data_div === null){ return; }
zoom_data_div.innerText = ""
zoom_data_div.innerText += `Scale: ${zoom_levels[zoom_level]}x\n`
zoom_data_div.innerText += `Pan : ${x_pan}, ${y_pan}`
@ -84,7 +87,7 @@
}
function patch_ui(){
const zoom_data_div = document.createElement("div")
zoom_data_div = document.createElement("div")
document.getElementById("logDiv").appendChild(zoom_data_div)
const controls_table = document.getElementById("controlsTable").lastElementChild
@ -108,7 +111,7 @@
<tr>
<td>Pan (fast)</td>
<td>
<kbd>Shift</kxbd> +
<kbd>Shift</kbd> +
<kbd>W</kbd>
<kbd>A</kbd>
<kbd>S</kbd>