Spaces:
Running on Zero
Running on Zero
play: reserve a bottom row + taller frame so the board prompt isn't clipped
Browse files- space/static/app.css +1 -1
- space/static/play.html +5 -1
space/static/app.css
CHANGED
|
@@ -241,7 +241,7 @@ html, body {
|
|
| 241 |
.term-bar .title { flex: 1; text-align: center; color: var(--mint-soft); }
|
| 242 |
.term-bar a { color: var(--jade); text-decoration: none; }
|
| 243 |
.term-bar a:hover { color: var(--mint); }
|
| 244 |
-
#terminal { flex: 1; padding: 0.
|
| 245 |
.term-status {
|
| 246 |
padding: 0.35rem 0.9rem;
|
| 247 |
font-size: 0.68rem;
|
|
|
|
| 241 |
.term-bar .title { flex: 1; text-align: center; color: var(--mint-soft); }
|
| 242 |
.term-bar a { color: var(--jade); text-decoration: none; }
|
| 243 |
.term-bar a:hover { color: var(--mint); }
|
| 244 |
+
#terminal { flex: 1; min-height: 0; padding: 0.4rem 0.4rem 0 0.8rem; }
|
| 245 |
.term-status {
|
| 246 |
padding: 0.35rem 0.9rem;
|
| 247 |
font-size: 0.68rem;
|
space/static/play.html
CHANGED
|
@@ -94,7 +94,11 @@ ws.binaryType = "arraybuffer";
|
|
| 94 |
|
| 95 |
function sendResize() {
|
| 96 |
if (ws.readyState === WebSocket.OPEN) {
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
}
|
| 99 |
}
|
| 100 |
|
|
|
|
| 94 |
|
| 95 |
function sendResize() {
|
| 96 |
if (ws.readyState === WebSocket.OPEN) {
|
| 97 |
+
// Reserve one row: the board docks its instruction prompt to the bottom
|
| 98 |
+
// row, and FitAddon tends to report one more row than is actually
|
| 99 |
+
// painted — without this margin that prompt renders just off-screen.
|
| 100 |
+
const rows = Math.max(1, term.rows - 1);
|
| 101 |
+
ws.send(JSON.stringify({ resize: [term.cols, rows] }));
|
| 102 |
}
|
| 103 |
}
|
| 104 |
|