Corrective tweaks

This commit is contained in:
2021-08-30 13:58:40 +00:00
parent b2adf1f9dc
commit 5a02e7e52d
7 changed files with 61 additions and 20 deletions
+3 -4
View File
@@ -96,8 +96,7 @@ globalThis.MemoryWindow = class MemoryWindow extends Toolkit.Window {
// Determine the height in pixels of one row of output
lineHeight() {
let ret = this.rows[0].address.getBounds().height;
return ret;
return Math.max(1, this.rows[0].address.getBounds().height);
}
// Determine the number of rows of output
@@ -106,7 +105,7 @@ globalThis.MemoryWindow = class MemoryWindow extends Toolkit.Window {
lineHeight = lineHeight || this.lineHeight();
let ret = clientHeight / lineHeight;
ret = fullyVisible ? Math.floor(ret) : Math.ceil(ret);
return Math.max(1, Math.min(ret, Math.floor(clientHeight / 8)));
return Math.max(1, ret);
}
// Key down event handler
@@ -115,7 +114,7 @@ globalThis.MemoryWindow = class MemoryWindow extends Toolkit.Window {
// Control is pressed
if (e.ctrlKey) switch (e.key) {
case "g": case "G":
let addr = prompt(this.application.translate("{app.romLoaded}"));
let addr = prompt(this.application.translate("{app.goto_}"));
if (addr === null)
break;
this.seek(