From 3563ee9a95936968887fe26544f6146b9775aa14 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Tue, 27 Oct 2026 13:54:30 +0100 Subject: [PATCH] R box designer: size by the corner, reorder pins, pick and move several, pixels one by one, fitted boxes, displays from inside in free spots - A picked lamp, display or screen has a size grip on its corner. - A pin dragged onto or past its neighbour swaps places with it (the order is kept in the design; boxes designed before keep theirs). - Shift + click, or a box around things, picks several: dragged or moved with the arrow keys together, drawings among them deleted together. - A screen can be split into its pixels, each placed on its own (they start where they sat, sized and turned as the screen was), or joined. - New designs fit the box to what is on it (Fit, on and off): it shrinks as well as grows. A size typed in turns it off. - A display of a part inside lands in the first free spot inside the box instead of under it, and keeps the size and turn its own box gives it. - Pointing at a display from a part inside (in the designer and on the placed box) says which part it is from. Co-Authored-By: Claude Opus 5.5 (1M context) --- app/assets/css/main.css | 16 ++ app/components/editor/FaceDialog.vue | 326 +++++++++++++++++++++++---- app/components/editor/NodeView.vue | 1 + app/lib/logic/geometry.ts | 156 ++++++++++--- app/lib/logic/project.ts | 2 + app/lib/logic/types.ts | 6 + tests/face.test.ts | 85 ++++++- 7 files changed, 521 insertions(+), 71 deletions(-) diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 28f80cf..ebeb885 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -5673,3 +5673,19 @@ button.tile:hover { stroke-width: 2; pointer-events: none; } + +/* Box designer: a box around things to pick them, the size grip, displays from parts inside. */ +.face-pickbox { + fill: rgb(76 194 255 / 0.08); + stroke: var(--accent); + stroke-dasharray: 4 3; + pointer-events: none; +} + +.face-grip.scale { + cursor: nwse-resize; +} + +.face-thing.nested:not(.sel) { + stroke-dasharray: 3 2; +} diff --git a/app/components/editor/FaceDialog.vue b/app/components/editor/FaceDialog.vue index 4187d00..2fe152b 100644 --- a/app/components/editor/FaceDialog.vue +++ b/app/components/editor/FaceDialog.vue @@ -1,9 +1,11 @@