From e181aa09bd37c92ba8effb42dbe3bfab1262b7be Mon Sep 17 00:00:00 2001 From: Adam French Date: Fri, 23 Oct 2026 20:52:17 +0100 Subject: [PATCH] Let the box editor panel be resized and its code scaled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drag the panel's left edge (double-click to reset, arrow keys when focused) to change its width; the canvas pads itself by the same width. A−/A+ in the header, or Ctrl/Cmd +/-/0 in the editor, change the code's text size. Both are remembered per browser in localStorage. Co-Authored-By: Claude Opus 5.5 --- vue/README.md | 5 +- vue/src/views/home3/BoxCanvas.vue | 7 +- vue/src/views/home3/BoxEditor.vue | 126 +++++++++++++++++++++++++++-- vue/src/views/home3/CodeEditor.vue | 29 +++++-- vue/src/views/home3/editorPrefs.js | 47 +++++++++++ 5 files changed, 201 insertions(+), 13 deletions(-) create mode 100644 vue/src/views/home3/editorPrefs.js diff --git a/vue/README.md b/vue/README.md index 2a1c058..8e9ad99 100644 --- a/vue/README.md +++ b/vue/README.md @@ -291,7 +291,10 @@ renders any page's boxes. automatically on leaving the box (selecting another, clicking empty canvas, Done, ✕). CodeMirror is loaded only when that panel opens; the panel is teleported to - ``. + ``. Its width (drag the left edge, double-click to reset) and the + code's text size (A−/A+, or Ctrl/Cmd +/−/0 in the editor) are kept per + browser in localStorage by `editorPrefs.js`; the canvas pads itself by the + same width so it rescales beside the panel. Image and video files dropped onto the canvas in edit mode are uploaded and each becomes an unframed box at the drop point. "Insert upload" stores a file through `@/uploads` (see "Uploading files") and puts an ``/`