mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
No room border ends in a tooth: walls join round
Owner 2026-08-04: «углы границ комнат всё ещё с зубцами (фиксили для декоративных линий, они теперь заканчиваются полукружьями, надо сделать так же для границ комнат)». A default miter join on a sharp room corner shoots a spike far past the two walls that meet there, and flips to a flat bevel once the miter limit clips it — both read as a tooth. Room borders now join ROUND: * .room (polygon / evenodd path / rect) — one rule, so the plan view, the Plan editor and the static space-card all get it; * .room-outline — a room with open boundaries draws its walls as separate M..L subpaths, so its corners are stroke ENDS: round caps close them the same way a round join closes a contour; * .seg — the contour being drawn in the editor already had round caps, now it states the join too. smoke_render_parity checks both renderers and the trimmed outline; demo/shot_room_joins.mjs is the before/after still (a 45° apex).
This commit is contained in:
@@ -47,6 +47,29 @@ const res = await page.evaluate(async () => {
|
||||
out.parity = out.fullCardRoom0 === out.staticCardRoom0;
|
||||
out.overrideRespected = out.staticCardRoom0 === 'transparent';
|
||||
|
||||
// Owner 2026-08-04: «углы границ комнат всё ещё с зубцами» — a miter join
|
||||
// spikes far past a sharp corner (and bevels it flat once past the miter
|
||||
// limit). Room borders join ROUND now, and BOTH renderers share the rule:
|
||||
// the styles live in one cardStyles, and this is the smoke that keeps it so.
|
||||
const joins = (root) => [...root.querySelectorAll('.room')]
|
||||
.map((el) => getComputedStyle(el).strokeLinejoin);
|
||||
const fullJoins = joins(main.shadowRoot || main.renderRoot);
|
||||
const staticJoins = joins(card.renderRoot);
|
||||
out.fullCardBordersRound = fullJoins.length > 0 && fullJoins.every((j) => j === 'round');
|
||||
out.staticCardBordersRound = staticJoins.length > 0 && staticJoins.every((j) => j === 'round');
|
||||
// the trimmed outline of a room with open boundaries is a set of separate
|
||||
// subpaths: its CAPS are the corners, so they must be round as well
|
||||
const f1cfg = cfg.spaces.find((s) => s.id === 'f1');
|
||||
f1cfg.rooms[0].open_to = [f1cfg.rooms[1].id];
|
||||
main._cfgEpoch++;
|
||||
main.requestUpdate(); await main.updateComplete;
|
||||
const outlines = [...(main.shadowRoot || main.renderRoot).querySelectorAll('.room-outline')];
|
||||
out.trimmedOutlineDrawn = outlines.length > 0;
|
||||
out.trimmedOutlineRound = outlines.every((el) => {
|
||||
const cs = getComputedStyle(el);
|
||||
return cs.strokeLinejoin === 'round' && cs.strokeLinecap === 'round';
|
||||
});
|
||||
|
||||
return out;
|
||||
});
|
||||
// зафиксировано прогоном на v1.46.0 и сверено с кодом
|
||||
|
||||
Reference in New Issue
Block a user