mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix(2.5d): room metrics keep their distance from the name at every zoom (#665)
The raised room label in 2.5D View sized its own box to the 44 px touch minimum (min-height + justify-content: center). The name therefore sat centred in 44 px while the metrics row, placed absolutely from the label bottom, hung (44 - name height) / 2 below it: 18.3 px at a 9 px name and 6.4 px at a 39 px one on the demo stand, against a constant 0.1 name height on the flat plan. The 44 x 44 px floor moves into an invisible ::before (the door-lock pattern), z-index -1 inside the label stacking context; the label box is sized by its text again. demo/smoke_iso_room_label_metrics.mjs measures gap / name height at two cameras (font x4) in Flat and 2.5D, and the 44 px floor and area-link hit targets on labels no raised device covers. Mutant iso-room-label-44-box-centres-name. Screenshots: 11 frames pixel-identical, fingerprint only. Issue: #665 User-Visible: yes
This commit is contained in:
@@ -3391,6 +3391,16 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: "",
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'iso-room-label-44-box-centres-name',
|
||||
guard: 'node demo/smoke_iso_room_label_metrics.mjs',
|
||||
because: '#665: sizing the raised label box to 44 px centres the name in it and pushes the metrics row away by (44 - name) / 2, so the gap drifts with zoom',
|
||||
patches: [{
|
||||
file: 'src/styles/plan.styles.ts',
|
||||
find: " .stage.projection-iso.mode-view .roomlabel {\n box-sizing: border-box;\n",
|
||||
replace: " .stage.projection-iso.mode-view .roomlabel {\n box-sizing: border-box;\n min-height: 44px;\n justify-content: center;\n",
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'static-card-descendants-hit-testable',
|
||||
guard: 'node demo/smoke_space_card.mjs',
|
||||
|
||||
Reference in New Issue
Block a user