Skip to main content

map-rendering

Changing what the interactive map shows or how painting, shattering, or map interaction behaves — MapLibre rendering, feature-state, Zustand map stores, undo/redo, and the geometry/parquet Web Workers.

Aller à l'installation

Informations de source

Dépôt
districtr/districtr-v2
Dernière activité de la source
18 septembre 2026 à 14:42
Langue détectée de SKILL.md
anglais
Étoiles
6
Forks
3

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
map-rendering
description
Changing what the interactive map shows or how painting, shattering, or map interaction behaves — MapLibre rendering, feature-state, Zustand map stores, undo/redo, and the geometry/parquet Web Workers.
user-invocable
false
# Map Rendering & Interaction ## Constraints - **The map must feel synchronous under continuous mouse movement.** This is the value the rendering design serves; its consequences: - Heavy geometry/tabular work (dissolve/centroid math, parquet range scans) runs in `GeometryWorker`/`ParquetWorker`, never on the `mousemove`-driven paint path. - The paint path writes MapLibre feature-state directly and synchronously from the store action (see the comment at `assignmentsStore.ts`'s paint path) — do not marshal paint updates through an async layer re-render. - A gesture coalesces to **one undo entry**: assignments buffer in `accumulatedAssignments` and ingest once at gesture end. Any *automatic* post-paint side effect (e.g. auto-heal) must fold into the triggering gesture's undo entry, not open its own — commit `07af68f6` fixed exactly this regression after PR #634 made undo per-gesture (detail in `docs/decisions.md`). ## Vocabulary at this surface - **Shatter / Break / Block Mode / Super Draw are one feature**: code says `shatter` (`ACTIVE_TOOLS.SHATTER`, ~45 files); the toolbar label is "Break"; user copy says "break down into blocks"; the pill component is `BlockModePill`; the tool is gated behind "Super Draw" mode. Grepping the UI word "break" misses the implementation. - **"Public" means "read-only viewer," not a permissions/visibility property**: `PublicMap`/`PublicDistrictLayers`/`PUBLIC_SOURCE_ID` render a plan's already-computed district geometry (`GET /document/{id}/stats`) for the share-link/Evaluate view; `MainMap` is the interactive block-level editor, picked instead via `isPublicPage` in `MapPage.tsx`. There is no "private district" — reading "Public" as an access-control term is the trap. ## Where the rest lives - Rendering architecture narrative (stores → subscribers → MapLibre, layer stack, worker contracts, event flow): `docs/overview.md`. - Layer-separation and undo history: `docs/decisions.md`.
Voir sur GitHub