Skip to content

feat(mapper): in-app AutoMapper editor + pan + smarter labels#53

Merged
monil2233 merged 1 commit into
mainfrom
feature/mapper-editor
Jun 6, 2026
Merged

feat(mapper): in-app AutoMapper editor + pan + smarter labels#53
monil2233 merged 1 commit into
mainfrom
feature/mapper-editor

Conversation

@monil2233
Copy link
Copy Markdown
Contributor

Summary

Brings the Genie 4 AutoMapper window's editing & navigation tools into the Genie 5 mapper. Addresses part of #44 (AutoMapper toolbar parity).

Editor (Edit mode)

  • Select a room (yellow outline), drag to move it (snaps to the grid; only marks the zone dirty when the cell actually changes).
  • Remove a room (button, Delete key, or right-click → Remove Room) and Reset IDs (renumber 1..N, remap arc destinations).
  • Edit Room properties panel: Title / Notes / Color / Server-id → Apply.
  • Toggles: Snap, Lock (positions), Dup (allow duplicate rooms while recording).
  • New (blank zone) + Save (unsaved ● indicator). Record = auto-create rooms as you walk.

Navigation

  • Grab-to-pan: left-drag (navigate mode / empty space) or middle-drag (any mode) — you can now reposition the map when zoomed in.

Labels

  • Collision-aware placement: each label takes the first free slot (right/left/above/below), is skipped when crowded (current/selected/hovered always shown), with a dotted leader line when displaced.
  • Labels toggle: primary name only (default) vs. the full |-separated list. Full set is always in the hover tooltip.

Map format

Saves round-trip through the existing Genie 4 XML exporter, so edited zones stay compatible with Genie 4 / Lich / the Maps repo.

Type of Change

  • New feature

Related Issue

Addresses part of #44.

Testing

Built clean on all targets locally; smoke-tested in the running app: toolbar + edit cluster, select/drag/move, dirty tracking, remove, pan-when-zoomed, and the label declutter + toggle.

Brings the Genie 4 AutoMapper window's editing/navigation tools to the
Genie 5 mapper (addresses part of #44).

Engine (AutoMapperEngine):
- RemoveNode(id): delete a node + scrub dangling arcs, rebuild indexes.
- ResetMapIds(): renumber nodes 1..N, remap all arc destinations.
- NotifyStructureChanged(): rebuild fingerprint/server-id indexes after
  Title/ServerRoomId edits.
- AllowDuplicateRooms flag: when recording, skip the fuzzy fingerprint/
  title match tiers so look-alike rooms get their own node (definitive
  server-id / graph-arc tiers still match). Off by default.

Canvas (MapCanvas):
- Edit mode: select a room (yellow outline), drag to move (commits to a
  grid cell on release; only marks dirty when the cell actually changes),
  Delete key + Remove Room context item.
- Grab-to-pan: left-drag (navigate mode / empty space), middle-drag any
  mode — lets you reposition the map when zoomed in.
- Collision-aware labels: place each label in the first free slot
  (right/left/above/below), skip when crowded (always keep current/
  selected/hovered), dotted leader line when displaced. Labels toggle
  switches primary-name-only (default) vs the full |-separated list.

App/VM (MapperViewModel, App.axaml):
- Editor toolbar: Edit, Record (auto-create), New, Save (unsaved dot),
  Labels, and an edit-only cluster (Remove, Reset IDs, Snap, Lock, Dup).
  Edit Room properties panel (Title/Notes/Color/Server-id + Apply).
- Save derives a filename for brand-new zones; round-trips through the
  existing Genie 4 XML exporter so the community map format is preserved.
@monil2233 monil2233 merged commit b2baa19 into main Jun 6, 2026
4 checks passed
@monil2233 monil2233 deleted the feature/mapper-editor branch June 6, 2026 05:26
monil2233 added a commit that referenced this pull request Jun 6, 2026
Mapper editor + pan + smarter labels (#53) and windowed (MDI) document
mode (#52) since alpha.3.4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant