v0.2.3: visible cross-panel drag ghost, front-image fallback, shorter hint

- Fix invisible device while dragging from front to rear: the block
  being dragged stayed structurally inside its own source <svg>, so it
  rendered underneath the other panel once it visually overlapped it.
  Replaced the in-SVG transform with a free-floating HTML ghost fixed
  to <body> that tracks the pointer, unaffected by either SVG's own
  stacking - the original block just dims in place during the drag, as
  before.
- Fix rear elevation showing nothing for a device type with no
  rear_image: only full-depth devices (which have a genuinely
  different back) are restricted to their own rear image now; a
  shallow device (e.g. a PDU) falls back to its front image on the
  rear view, since that's usually the only picture that exists and is
  still recognisable either way.
- Shorten the drag-hint badge text; the German translation of the
  previous, longer wording didn't fit well next to the other controls
  above the elevation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 14:01:42 +02:00
co-authored by Claude Sonnet 5
parent 41141ec318
commit 1793bf13e2
10 changed files with 94 additions and 22 deletions
+12 -2
View File
@@ -95,12 +95,22 @@ class ElevationBlock:
The device type's image for the face this block is drawn on, i.e. what's
physically visible from that side of the rack - not the device's own mounting
face, which only matters for half-depth devices occupying one face at a time.
A full-depth device genuinely has two different sides, so its rear view only
ever shows its own rear image (or nothing, if none is set) - showing the front
picture there would misrepresent what's actually visible from the back. A
shallow device (e.g. a PDU) has no real "back" of its own; for those, the rear
view falls back to the front image, since that's usually the only picture that
exists and is still perfectly recognisable from either side.
"""
device_type = self.device.device_type
if device_type is None:
return None
image = device_type.front_image if self.face == DeviceFaceChoices.FACE_FRONT else device_type.rear_image
return image if image else None
if self.face == DeviceFaceChoices.FACE_FRONT:
return device_type.front_image or None
if self.device.effective_full_depth:
return device_type.rear_image or None
return device_type.rear_image or device_type.front_image or None
class Elevation: