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:
Binary file not shown.
@@ -340,9 +340,6 @@ msgstr "Geräte"
|
||||
msgid "Dimensions"
|
||||
msgstr "Abmessungen"
|
||||
|
||||
msgid "Drag devices to move them"
|
||||
msgstr "Geräte zum Verschieben ziehen"
|
||||
|
||||
msgid "Draw.io (.drawio)"
|
||||
msgstr "Draw.io (.drawio)"
|
||||
|
||||
@@ -926,3 +923,8 @@ msgid "{{ counter }} planned device will be created per rack."
|
||||
msgid_plural "{{ counter }} planned devices will be created per rack."
|
||||
msgstr[0] "Pro Rack wird {{ counter }} geplantes Gerät angelegt."
|
||||
msgstr[1] "Pro Rack werden {{ counter }} geplante Geräte angelegt."
|
||||
|
||||
msgid "Drag devices to move or flip them between front and rear"
|
||||
msgstr ""
|
||||
"Geräte ziehen, um sie zu verschieben oder zwischen Front und Rückseite zu "
|
||||
"wechseln"
|
||||
|
||||
Reference in New Issue
Block a user