Skip to content

Commit d45feb7

Browse files
B2JK-Industryclaude
andcommitted
fix(ui): PR-P G-36 — rebalance right-edge slots so all 20 are visible
User feedback (screenshot 9:11): 'všetky budovy ktoré buď mám alebo môžem mať (takže voľné sloty) sa nezobrazujú' — the rightmost city slots weren't visible at desktop width. Root cause: SLOT_MAP slot 19 was a 10-px "edge filler" sitting at x=1790 in the 1800-wide SVG canvas. At ~1240-px container scale, its on-screen width was ~7 px — practically invisible. Decorative slots 14-17 next to it were also crammed (50-60 px each at varied gaps), reading as a busy strip with no breathing room. Repacked the right-edge cluster into 5 evenly-sized slots (50 px wide, 5-px gaps), with slot 19 promoted from a 10-px filler to a proper 40-px civic slot at x=1750. Net x-extent goes from 1530-1800 to 1530-1790 → leaves 10 px of canvas margin before the right edge so the rightmost tile doesn't sit flush against the card border. Slot IDs unchanged; player-save references slot.id (a number), not coordinates, so no migration needed. Only the visual position moves. Verified: - pnpm typecheck → 0 errors - pnpm test → 719/719 (no SLOT_MAP coordinate assertions broke) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8b4d7fe commit d45feb7

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

lib/building-catalog.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -531,13 +531,20 @@ export const SLOT_MAP: SlotDef[] = [
531531
{ id: 12, category: "residential", x: 1350, y: 320, w: 80, h: 80 },
532532
{ id: 13, category: "residential", x: 1440, y: 320, w: 80, h: 80 },
533533
// Row 5 — decorative (any), 4 slots
534-
{ id: 14, category: "decorative", x: 1530, y: 340, w: 60, h: 60 },
535-
{ id: 15, category: "decorative", x: 1600, y: 340, w: 60, h: 60 },
536-
{ id: 16, category: "decorative", x: 1670, y: 340, w: 60, h: 60 },
537-
{ id: 17, category: "decorative", x: 1740, y: 340, w: 50, h: 60 },
538-
// Row 6 — civic at bottom
534+
// G-36 — slots 14-17 + 19 rebalanced. Pre-fix slot 19 was a 10-px
535+
// "edge filler" sitting at x=1790 (literally last 10 SVG units of
536+
// a 1800-wide canvas). At ~1240-px container width it rendered as
537+
// ~7 px on screen — the user reported it as "slot not visible".
538+
// Re-spaced so all 5 right-edge slots are 50 px wide with 5-px
539+
// gaps and the row leaves 10 px of breathing room before the
540+
// canvas edge. Slot ids unchanged → no save migration needed.
541+
{ id: 14, category: "decorative", x: 1530, y: 340, w: 50, h: 60 },
542+
{ id: 15, category: "decorative", x: 1585, y: 340, w: 50, h: 60 },
543+
{ id: 16, category: "decorative", x: 1640, y: 340, w: 50, h: 60 },
544+
{ id: 17, category: "decorative", x: 1695, y: 340, w: 50, h: 60 },
545+
// Row 6 — civic at the canvas extremes
539546
{ id: 18, category: "civic", x: 10, y: 340, w: 40, h: 60 },
540-
{ id: 19, category: "civic", x: 1790, y: 340, w: 10, h: 60 }, // edge filler, usable but small
547+
{ id: 19, category: "civic", x: 1750, y: 340, w: 40, h: 60 },
541548
];
542549

543550
export function getSlot(id: number): SlotDef | null {

0 commit comments

Comments
 (0)