Vinzent03/obsidian-advanced-uri

Canvas navigation command [Feature request]

Closed this issue · 4 comments

Hi.

Can you add a command that will open canvas and focus a card by id or using canvas.zoomToBbox(minX, minY, maxX, maxY)?

Because, for now there is no simple way to navigate on a large canvas, this feature would be incredible.

What is your use case for this feature? Like how do you get the node id in your flow?

The problem in the current obsidian version is that when you work with canvas nodes, you cannot have links between them. That becomes a problem when you need a link to a specific node in Canvas. Also, there are big canvases where some nodes mention others.

Considering the above, my use case is creating links in nodes like that:
obsidian://advanced-uri?vault=<your-vault>&filepath=my-canvas-file&canvasnode=<node-id-in-canvas>
Or if I need a link to a good canvas view:
obsidian://advanced-uri?vault=<your-vault>&filepath=my-canvas-file&canvascoords=100,100,500,500

Then I can easily navigate between nodes and canvases.

I would try to make a pull request, but cannot get how to move focus and view in canvas tab after opening a file.

Available now in 1.42.0 🎉 The usage is documented here https://publish.obsidian.md/advanced-uri-doc/Actions/Canvas