From 6f14f122078834764c86c8d02e0b0d8bc99ebbb3 Mon Sep 17 00:00:00 2001 From: James Youngman Date: Sun, 21 Jul 2024 14:41:36 +0100 Subject: [PATCH] Ensure that the bottom grid cell actually contains the keyboard. Also allow the size of the LW paper to grow slightly as input arrives, and then provide a scrollbar. --- tx2-web/src/Keyboard.tsx | 9 +++++---- tx2-web/src/LincolnWriter.tsx | 1 + tx2-web/src/MainGrid.tsx | 2 +- tx2-web/src/styles.scss | 19 ++++++++++++------- tx2-web/src/styles.scss.d.ts | 3 ++- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/tx2-web/src/Keyboard.tsx b/tx2-web/src/Keyboard.tsx index de73a9d..ee80aee 100644 --- a/tx2-web/src/Keyboard.tsx +++ b/tx2-web/src/Keyboard.tsx @@ -1,5 +1,5 @@ -import { create_html_canvas_2d_painter, draw_keyboard } from '../build/tx2_web' -import React, { useEffect, useRef, useState } from 'react' +import { create_html_canvas_2d_painter, draw_keyboard } from '../build/tx2_web'; +import React, { useEffect, useRef, useState } from 'react'; import { Tx2Controller } from 'controller/tx2'; type Coordinates = { @@ -65,6 +65,7 @@ interface KeyboardProps { tx2Controller: Tx2Controller, className?: string | undefined, hdClass?: string | undefined, + keysClass?: string | undefined, unit: number, } @@ -112,9 +113,9 @@ const Keyboard = (props: KeyboardProps) => { // We draw two canvases; the first is visible and shows the actual // keyboard keys. The second is invisible but the same size, and is // used for mouse pointer hit detection. - return (
+ return (
diff --git a/tx2-web/src/MainGrid.tsx b/tx2-web/src/MainGrid.tsx index 6e83bfa..523867c 100644 --- a/tx2-web/src/MainGrid.tsx +++ b/tx2-web/src/MainGrid.tsx @@ -121,7 +121,7 @@ export const MainGrid = (props: MainGridProps) => (
- +