Panes by column: a forest of panes, curves between them, close, pin and an active rule
The tree of forks becomes a forest: a pinned pane stays open when a pane it was opened from closes, as an orphan in its own column. Close takes a pane and what was opened from it, pinned panes excepted; pin and unpin; [ and ] move to the pane above or below in a column. The panes view is laid out by column: column d holds every pane at depth d and divides its own height among them, a short pane taking only what its text needs; when they do not fit, all but the focused branch's pane (and pinned ones) fold into one-line tabs. A faint curve runs from the words, row or link each pane was opened from to its title, the focused branch's in a stronger ink; curves through one gutter take lanes side by side, ordered to cross least. Every pane has the same hairline right and bottom. The active pane has a heavy rule across its top, the rest of the focused branch a hairline. Each pane has a pin and a x at its top right (the x also on its spine); q closes the active pane, whatever it shows (it used to close a whole fork from wherever the fork began, which closed the node an article was opened from); P pins it. /curves off hides the curves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
2f8ca98207
commit
3298cc430c
20 files changed
+1822
-783
No files matched your search
+7
-1
@@ -512,6 +512,9 @@ export function App() {
|
||||
const click = (e: MouseEvent) => {
|
||||
if (store.mode === "edit") return;
|
||||
const target = e.target as HTMLElement;
|
||||
// A pane's × and pin act on that pane, wherever the focus is.
|
||||
const ctl = target.closest<HTMLElement>("[data-close], [data-pin]");
|
||||
if (ctl) return ctl.dataset.close ? store.closePane(Number(ctl.dataset.close)) : store.togglePanePin(Number(ctl.dataset.pin));
|
||||
const paneEl = target.closest<HTMLElement>("[data-pane-index]");
|
||||
const paneIndex = paneEl ? Number(paneEl.dataset.paneIndex) : store.paneAt;
|
||||
// A pane in another fork: that fork becomes the focused branch first, then the click does what it would there.
|
||||
@@ -647,7 +650,10 @@ export function App() {
|
||||
if (hit) return store.go(at.id, "sentence", hit);
|
||||
}
|
||||
const node = target.closest<HTMLElement>("[data-node]");
|
||||
if (node) store.go(node.dataset.node as NodeId);
|
||||
if (!node) return;
|
||||
// A pane's head makes that pane the active one.
|
||||
if (panes && paneEl && node.matches(".pane-head, .top")) store.paneAt = paneIndex;
|
||||
store.go(node.dataset.node as NodeId);
|
||||
};
|
||||
|
||||
const onOver = (e: MouseEvent) => {
|
||||
|
||||
Reference in new issue
Block a user