The app step by step · Chapter 24
Canvas
Some thoughts are better laid out side by side than one under another, recipes next to the shopping list, say, or a plan with arrows from step to step. That is what the canvas is for, a surface without edges on which you lay notes, text, pictures and links and join them with arrows. It is a file ending in .canvas beside your notes, in the open JSON Canvas format that other programs read too.
Making a canvas
Right-click a folder or a space in the sidebar and choose New canvas …. The new canvas is empty and lies in that folder. In the sidebar it has a symbol of its own, and one click opens it like a note.
What you can lay on a canvas
At the bottom of the canvas there is a bar with everything you can add. A right-click on an empty spot offers the same, and the new card then appears right where you clicked.
| Card | How to make it |
|---|---|
| Text | Double-click an empty spot. You write in it with the same editor as in a note, with links, lists, tasks and formulas. |
| Note | Note at the bottom, or drag a note from the sidebar onto the canvas. The card shows the whole note or just one of its sections. |
| Picture or file | File at the bottom, or drag it in from the sidebar. Pictures show, other files appear as a tile with their name. |
| Link | Link at the bottom and a web address. A click on the card opens the page in a new tab. |
| Group | Group at the bottom. Whatever lies wholly inside a group moves along when you move it. |
Reading a note and editing it right beside the canvas
A note card shows the note as it looks when reading. A double click opens it to the right of the canvas in the editor you know, and what you write there shows on the card right after. Show in the sidebar in the bar above the card takes you to the note in the sidebar, and Open as page opens it in full.
Arranging without fiddling
Bring a card close to another and its edges and middles snap to it, with thin guides showing what it lines up with. Hold Alt while dragging and nothing snaps, and the magnet at the top right turns snapping off altogether. While you drag a card it is see-through, so you can see what lies beneath it. The corner at the bottom right changes its size.
Above a chosen card a small bar appears with colour, edit and remove, and a right-click on the card offers the same. Choose several cards with Ctrl or Shift and a click, or all of them with Ctrl + A, and colour or move them together.
Arrows that find their way
Move the mouse over a card and a point appears on each side. From there you drag an arrow to another card. Let go on one of its points and the arrow ends there; let go anywhere else on the card and it ends on the side nearest the pointer.
Arrows run around the cards in their way at right angles and turn halfway between two cards. A click on an arrow shows its tools at the top for a label, heads at both ends, a colour and removing it. The label stays readable however far you zoom out.
When cards lie on top of each other, an arrow finds no way around them. nexlore then draws it as a curve that disappears under the card on top. The file only keeps the two sides an arrow joins anyway, and every other program draws it its own way.
Lore saysArrows at right angles read best on a busy canvas. I spin my threads the same way, only with eight legs.
Cards from other spaces
A note or a picture may come from any space you may read. Drag it in from the sidebar, or find it with Note at the bottom, which searches all your spaces. The head of the card then says which space it comes from.
Whoever may see the canvas but not that space sees the card locked, with a lock and its name. Nothing of what it holds reaches their browser, and the server sees to that.
When your notes change
Rename a note, move it or rename its space, and nexlore updates the canvas. Delete a note that lies on a canvas and the delete dialog names the canvas. The card stays with its place, size and arrows and says that the note is not there any more, and when you bring the note back from the trash, the card shows it again.
A note names the canvases it lies on among its backlinks. Every save of a canvas is a version, and you bring an older one back from Versions at the top. One person edits a canvas at a time. Whoever opens it meanwhile sees a notice and the canvas as it is, and it loads again as soon as it is saved.
On a phone you look around a canvas, read the cards, edit text cards and open notes. Arranging cards and drawing arrows is for a computer. Far out, cards show only their title.
Keys on the canvas
| Keys | What they do |
|---|---|
| Delete or Backspace | take the chosen cards with their arrows, and chosen arrows, off the canvas |
| Ctrl + Z, Ctrl + Shift + Z | undo and redo, a removal with all its arrows as one step too |
| Ctrl + A | choose every card |
| Enter | edit the chosen text card |
| Esc | stop editing and clear the choice |
| Alt while dragging | turn snapping the other way |
What the file looks like
A canvas is an ordinary text file. nexlore writes it with tabs and one card per line, so a save only changes the lines you changed something on.
{
"nodes":[
{"id":"a1","type":"text","text":"Dinner party","x":0,"y":0,"width":300,"height":140},
{"id":"b2","type":"file","file":"Kitchen/Recipes/Focaccia.md","x":440,"y":0,"width":320,"height":220}
],
"edges":[
{"id":"c3","fromNode":"a1","fromSide":"right","toNode":"b2","toSide":"left","label":"starter"}
]
}