mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
room settings button: half size, dead-centred on the room
Owner's follow-up: the button was too large — height is now 0.77 of the icon-size unit (half the previous), width follows through the derived font and padding. The below-centre offset is gone: the anchor is the room's geometric centre on BOTH axes, verified against the polygon centroids in vb coordinates (exact match on all four demo rooms). Still zooms with the plan. smoke_feedback_v2's gear assertions pinned the 2026-07-27 feedback sizes (font >= 10px, box >= 18x40) — superseded by the owner's half-size order; the contract is now 'sized from the device icon, clickable, opens the dialog'.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user