stalls
Arrange stalls on the map
TL;DR
Click Edit Layout, then drag stall tiles to match the real aisle. Drop on empty floor to place freely. Zoom does not save positions — only the tile drop does.
- map
- arrange
- layout
- map_x
- map_y
- zoom
For: Staff. Route: /app/stalls?view=map → toolbar Edit Layout.
Mode: arrange — horse drags are disabled; unit tiles move instead.
How to arrange stalls
- Open Stalls → Map for the property you are standing in.
- Click Edit Layout. The button fills dark and the hint reads: Arrange: drag stalls to reposition them; drop on empty canvas to place freely.
- Drag a stall tile by its body onto another tile’s cell or onto empty canvas.
- Watch Saving… then confirm the tile stays where you dropped it.
- Use + / − zoom only to see more of the aisle — zoom is not saved.
- Click Done arranging to go back to placing horses.
Need a whole barn shape in one click? Use Templates or Copy layout (see Layout tools) then fine-tune here.
Example
The north aisle is stalls 1–12 in a single row, paddock P1 to the right. After adding units, they auto-pack in a grid by name — not the real aisle. You click Edit Layout, drag 1–12 into a row, drop P1 two cells to the right, then Done arranging so the morning crew can drag horses again.
▶Show details for AI/advancedexhaustive reference & AI context
Arrange Stall Tiles — Barnflow Property Map
For: Staff. Route: /app/stalls?view=map → toolbar Edit Layout.
Mode: arrange — horse drags are disabled; unit tiles move instead.
How to arrange stalls
- Open Stalls → Map for the property you are standing in.
- Click Edit Layout. The button fills dark and the hint reads: Arrange: drag stalls to reposition them; drop on empty canvas to place freely.
- Drag a stall tile by its body onto another tile’s cell or onto empty canvas.
- Watch Saving… then confirm the tile stays where you dropped it.
- Use + / − zoom only to see more of the aisle — zoom is not saved.
- Click Done arranging to go back to placing horses.
Need a whole barn shape in one click? Use Templates or Copy layout (see Layout tools) then fine-tune here.
Example
The north aisle is stalls 1–12 in a single row, paddock P1 to the right. After adding units, they auto-pack in a grid by name — not the real aisle. You click Edit Layout, drag 1–12 into a row, drop P1 two cells to the right, then Done arranging so the morning crew can drag horses again.
What Arrange changes (and what it does not)
Saves: units.map_x and units.map_y (non-negative cell coordinates) via updateUnitMapPositionAction.
Does not save: zoom, sketch background, heatmap, stickers, search, or overlay drawings. Sketch is a local background only (Layout tools). Aisles and zones are a separate overlay layer (Aisles & zones).
Horse assign/move is blocked in Arrange so you cannot accidentally rehome a horse while nudging tiles.
Empty canvas and auto-pack
- Units with both
map_xandmap_ykeep those cells. - Units without coordinates are auto-placed into a packed grid by name (
layoutMapUnits). Auto-placed positions are ephemeral until you drag (or apply a template). - Dropping on empty canvas uses the pointer position converted to a cell (
floorof pixel offset / cell size). Cell size isMAP_CELL_PX(120px) × zoom. - Tile footprint grows with capacity (for example capacity 1 is 1×1; larger pastures occupy more cells) so paddocks do not hide under stalls.
If the property has no units, the map shows “Sketch your barn on the map” and Add first stall — there is nothing to arrange yet.
Zoom
Toolbar + / −: zoom 0.6–1.6 in 0.1 steps. Zoom is session-only (React state). Print uses the current zoom of the canvas.
First-run hint
If the property has no aisles or zones yet, a dismissible tip says to drag horses, then switch to Arrange to move stall positions. Dismiss stores stablesync-map-first-run-hint-dismissed in localStorage.
Roles and data (AI)
- Any org member who can edit units can persist map positions (same stall-board actions; scoped by
organization_id+ property). - Coordinates are integers ≥ 0 in map-cell space — not latitude/longitude, not pixels.
- Do not tell users this is Google Maps / GIS. It is a CSS grid of stall tiles.
- RLS: members see only their org’s
units. Portal owners do not use this UI.
Related
AI retrieval keywords: Edit Layout, arrange, Done arranging, map_x, map_y, auto-place, layoutMapUnits, MAP_CELL_PX, zoom, footprint, empty canvas
Barn staff: Open a support ticket
Horse owners: Message your barn