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.

跳到安装

来源信息

仓库
districtr/districtr-v2
最近来源活动
2026年9月18日 14:42
检测到的 SKILL.md 语言
英语
星标
6
分支
3

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
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`.
在 GitHub 查看