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.

Ir a la instalación

Datos de origen

Repositorio
districtr/districtr-v2
Última actividad en el origen
18 de septiembre de 2026 a las 14:42
Idioma detectado de SKILL.md
inglés
Estrellas
6
Forks
3

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
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`.
Ver en GitHub