Fix hiDPI center offset

pull/2/head
Andreas Gysin 2021-03-20 11:20:23 +01:00
rodzic 12643ca657
commit 1e6c46310a
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -87,9 +87,9 @@ function render(context, buffer) {
widths[i] = w
}
// Draw
let ox = (canvas.width - totalWidth) * 0.5
let ox = (canvas.width / scale - totalWidth) * 0.5
const y = j * ch
for (let i=0;i<c; i++) {
for (let i=0; i<c; i++) {
const cell = buffer[offs + i]
const x = ox
if (cell.backgroundColor && cell.backgroundColor != bg) {