Repository navigation
Give top-level topics of a two-sided map a side of their own - #30
Merged
Merged
Conversation
A topic can be pinned to the left or right of the central topic (panel: Side of the map); the others are placed for balance. FreeMind and MindManager imports keep each topic on the side it had, in the file's order, and both writers emit those sides. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016C1G4PM7XGqJdpzydsnBCc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the item left open in #29: a two-sided map split its top-level topics by count, so a file with unequal left and right sides opened with topics on the wrong side.
Model
Node.side?: "left" | "right", meaningful on top-level topics of amap/map-ccwsheet only. It is the side as drawn, in the anticlockwise map too.mapSides(root)insrc/model.tsis the single place that decides the sides. With no side set anywhere it gives exactly the previous split (first half on the starting side), so existing documents draw as before. Otherwise a topic with a side keeps it and the others go, in order, to the side that holds fewer.layoutuses it instead of the count cut.moveTodrops the side when a topic is attached elsewhere.Editor
Formats
POSITIONand keeps the file's order (it used to reorder right-then-left); export writesPOSITIONfrommapSides, now for the anticlockwise map as well, and no longer counts floating topics in the split.Offset CXand keeps the file's order; a topic with no offset is left to the map. Export writes a tokenOffset CX="±1"for the topics of a map in which a side was set, and nothing more for a map that balances itself. The "unequal sides" line of the import report and the// ponytail:note are gone.Behaviour change to be aware of
FreeMind and MindManager two-sided maps now open with sides pinned on every topic, in file order. New topics added afterwards go to the side that holds fewer.
Tests
Three tests added (model, FreeMind, MindManager), one updated for the file-order change.
tsc --noEmitclean,vitest run: 137 passed. The panel control was exercised in the running app (Vite + Chromium): switching a topic to Left moves it and the other topic rebalances to the right.That
Offset CXcarries the side in real MindManager files remains an assumption of the reader, unchecked against MindManager itself.Generated by Claude Code