mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-07 23:19:14 +00:00
fix(space-card): nothing in the static schematic is hit-testable (#664)
The stage is pointer-events:none, but that is not an inherited ban: the shared marker styles opt the 44 px floor (.dev::before) and the painted capsule (.device-shell-frame) back in for the interactive plan (#564). The static card imports them whole, so since v1.76.0-beta.2 it showed a hand cursor over every marker and swallowed clicks that do nothing. The card now closes every descendant opt-in (.hp-static-stage *, ::before, ::after). smoke_space_card asserts the browser hit test itself (elementFromPoint over the marker and a 9x9 grid across the stage) and the cursor, not the stage computed style that stayed green through the regression. Mutant static-card-descendants-hit-testable. Screenshots: 11 frames pixel-identical, fingerprint only (npm run docs:accept -- --identical). Issue: #664 User-Visible: yes
This commit is contained in:
@@ -949,6 +949,18 @@ class HouseplanSpaceCard extends LitElement {
|
||||
pointer-events: none; /* kill ALL interaction on the schematic (§4) */
|
||||
background: var(--ha-card-background, var(--card-background-color, #111));
|
||||
}
|
||||
/* #664: pointer-events is not an inherited ban — a descendant with its
|
||||
own 'pointer-events: auto' becomes a hit target again. The shared
|
||||
marker styles opt the 44 px floor (.dev::before) and the painted
|
||||
capsule (.device-shell-frame) back in for the interactive plan
|
||||
(#564), and this card imports them whole: the schematic then showed a
|
||||
pointer cursor over every marker and swallowed clicks that do nothing.
|
||||
Close every opt-in for the whole subtree, pseudo-elements included. */
|
||||
.hp-static-stage *,
|
||||
.hp-static-stage *::before,
|
||||
.hp-static-stage *::after {
|
||||
pointer-events: none;
|
||||
}
|
||||
.hp-static-stage > svg {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
|
||||
Reference in New Issue
Block a user