diff --git a/demo/smoke_feedback_v2.mjs b/demo/smoke_feedback_v2.mjs index 8acd62b..abc89a6 100644 --- a/demo/smoke_feedback_v2.mjs +++ b/demo/smoke_feedback_v2.mjs @@ -9,10 +9,13 @@ const res = await page.evaluate(async () => { const btn = sr().querySelector('.rlgearbtn'); out.gearButtonShown = !!btn; const cs = btn ? getComputedStyle(btn) : null; - out.gearReadable = cs ? parseFloat(cs.fontSize) >= 10 && cs.pointerEvents === 'auto' : null; + // 2026-07-29: владелец вдвое уменьшил кнопку — контракт теперь не «не + // меньше N px», а «размер от иконки устройства и кликабельность» + out.gearReadable = cs ? parseFloat(cs.fontSize) > 0 && cs.pointerEvents === 'auto' : null; out.gearHasLabel = btn ? btn.textContent.trim().length > 0 : null; const box = btn?.getBoundingClientRect(); - out.gearTapTarget = box ? box.height >= 18 && box.width >= 40 : null; + // (в редакторе плана .dev скрыты display:none — сравнивать не с чем) + out.gearTapTarget = box ? box.height > 6 && box.height < 40 : null; btn.dispatchEvent(new MouseEvent('click', { bubbles: true, composed: true })); await c.updateComplete; out.gearOpensDialog = c._roomDialog === true && !!c._roomEditId; diff --git a/demo/srv/assets/houseplan-card.js b/demo/srv/assets/houseplan-card.js index d7c6c78..4967f3a 100755 --- a/demo/srv/assets/houseplan-card.js +++ b/demo/srv/assets/houseplan-card.js @@ -410,12 +410,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow already rescales with the view, so the button zooms WITH the plan instead of keeping a constant screen size (owner's spec). */ .rlgearbtn { - --gear-h: calc(var(--icon-size, 2.5cqw) * 0.7 * 2.2); /* 70% of the icon BOX (icon + padding) */ + --gear-h: calc(var(--icon-size, 2.5cqw) * 0.77); /* owner: half the previous size */ position: absolute; - /* anchored to the room centre, sitting one button-height below it: the - room NAME defaults to the same centre, and dead-centred the button - covered it. The offset is in button units, so it zooms along. */ - transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95)); + /* dead-centred on the room, both axes (owner's spec) */ + transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.35em; diff --git a/dist/houseplan-card.js b/dist/houseplan-card.js index d7c6c78..4967f3a 100755 --- a/dist/houseplan-card.js +++ b/dist/houseplan-card.js @@ -410,12 +410,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow already rescales with the view, so the button zooms WITH the plan instead of keeping a constant screen size (owner's spec). */ .rlgearbtn { - --gear-h: calc(var(--icon-size, 2.5cqw) * 0.7 * 2.2); /* 70% of the icon BOX (icon + padding) */ + --gear-h: calc(var(--icon-size, 2.5cqw) * 0.77); /* owner: half the previous size */ position: absolute; - /* anchored to the room centre, sitting one button-height below it: the - room NAME defaults to the same centre, and dead-centred the button - covered it. The offset is in button units, so it zooms along. */ - transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95)); + /* dead-centred on the room, both axes (owner's spec) */ + transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.35em; diff --git a/src/styles.ts b/src/styles.ts index f9581a2..0e1747e 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -407,12 +407,10 @@ export const cardStyles = css` already rescales with the view, so the button zooms WITH the plan instead of keeping a constant screen size (owner's spec). */ .rlgearbtn { - --gear-h: calc(var(--icon-size, 2.5cqw) * 0.7 * 2.2); /* 70% of the icon BOX (icon + padding) */ + --gear-h: calc(var(--icon-size, 2.5cqw) * 0.77); /* owner: half the previous size */ position: absolute; - /* anchored to the room centre, sitting one button-height below it: the - room NAME defaults to the same centre, and dead-centred the button - covered it. The offset is in button units, so it zooms along. */ - transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95)); + /* dead-centred on the room, both axes (owner's spec) */ + transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.35em;