Canvas anchor on image?

Hi. Yes, the canvas is just JSON, but that’s only part of the story. When rendered, it becomes HTML and SVG elements, which can be styled with CSS.

The stacking order of elements follows their sequence in the JSON. Moving a node pushes it to the end of the list, so it appears on top. This order can be overridden with the CSS property z-index. That doesn’t change the JSON, but it does affect how elements are layered.

By default, all nodes have z-index: 0. Higher values bring elements to the front; if values are equal, rendering follows their HTML order (which mirrors the JSON). When you edit a node, Obsidian temporarily raises its z-index, then resets it to 0 once you exit.

My snippet simply assigns a high z-index to connections, so they are always displayed on top.