fix v1.18.1: the drawing ruler badge was invisible — .stage.markup hides .devlayer

The v1.18.0 measure label was rendered inside .devlayer, which markup mode hides
entirely (display:none) so icons don't obstruct drawing. Moved it to its own
.measurelayer. Verified visually on a real segment (3.60 m).
This commit is contained in:
Matysh
2026-07-16 06:53:31 +03:00
parent 18a0d279a7
commit 4593d96955
9 changed files with 37 additions and 12 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ import './space-card';
import { cardStyles } from './styles';
import { langOf, t, type I18nKey } from './i18n';
const CARD_VERSION = '1.18.0';
const CARD_VERSION = '1.18.1';
const LS_KEY = 'houseplan_card_layout_v1';
const LS_CFG = 'houseplan_card_cfg_v1'; // cache of the server config+layout for instant rendering
const LS_ZOOM = 'houseplan_card_zoom_v1';
@@ -2025,10 +2025,10 @@ class HouseplanCard extends LitElement {
${disp.showNames && !this._markup
? space.rooms.map((r) => this._renderRoomLabel(r, space, view, disp))
: nothing}
${this._markup && this._tool === 'draw' && this._path.length && this._cursorPt && !this._contourClosed
? this._renderMeasureLabel(view)
: nothing}
</div>
${this._markup && this._tool === 'draw' && this._path.length && this._cursorPt && !this._contourClosed
? html`<div class="measurelayer">${this._renderMeasureLabel(view)}</div>`
: nothing}
</div>
${this._zoom > 1
? html`<div class="zoombadge">${Math.round(this._zoom * 100)}%</div>`
+5
View File
@@ -236,6 +236,11 @@ export const cardStyles = css`
z-index: 1;
}
.roomlabel:active { cursor: grabbing; }
.measurelayer {
position: absolute;
inset: 0;
pointer-events: none;
}
.measurelabel {
position: absolute;
transform: translate(12px, -150%);