v0.2.2: support dragging a device between front and rear elevations

Front and rear panels already share one coordinate system (same
UNIT_HEIGHT, RACK_X, ...), just placed side by side on screen, so the
existing delta-based drag math is equally valid for a drop on the
other panel - only needed to detect which face the pointer ended up
over (elementFromPoint at drop time) and include it as `face` in the
submitted move; the reorder endpoint already supported changing it.

Also fixed a bug this surfaced: without pointer-events: none on the
dragged block during the drag, elementFromPoint() at drop time always
hit the dragged block itself (it's what's rendered under the cursor),
never the panel actually underneath - cross-face drops would never
have been detected. Pointer capture keeps delivering move/up events to
the block regardless of its own pointer-events value, so this is safe.

Added overflow: visible on the elevation SVGs so a device being
dragged toward the other panel doesn't just vanish at its own SVG's
edge mid-drag.

Updated the German translation for the changed drag-hint string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 13:50:57 +02:00
co-authored by Claude Sonnet 5
parent 67d999e234
commit 41141ec318
9 changed files with 57 additions and 11 deletions
+12
View File
@@ -1,5 +1,17 @@
# Changelog
## 0.2.2
- Drag-and-drop now supports dragging a device from the front elevation onto the rear
one (and back), reassigning its face. Front and rear share one coordinate system
(same unit height, rack offset, ...), just placed side by side on screen, so the
existing delta-based drag math is already valid for a cross-panel drop - only the
target face needed detecting (via `elementFromPoint` at drop time) and sending along.
Fixed a related bug along the way: without `pointer-events: none` on the dragged
block during the drag, `elementFromPoint` would always hit the dragged block itself
rather than the panel underneath, so the cross-face drop would never have been
detected; pointer capture keeps delivering move/up events to it regardless.
## 0.2.1
- Rework PNG export: instead of rasterizing the SVG export via `<img>`/`<canvas>`