Are pixels really the best way to encode position at this point?
JSON Canvas Spec (2024)
21–30 of 43 posts
Re: JSON Canvas Spec (2024)
#22I feel like this page does a good job of telling me nothing. It's a representation of a graph? Where each node can be a text string or a file or a URL or a container of other nodes? And somehow these links and files and containers have a color? What is the purpose of this? Why would I want my file to be blue?
See also the original inspiration for the format: https://obsidian.md/canvas
Re: JSON Canvas Spec (2024)
#23Re: JSON Canvas Spec (2024)
#24JSON Canvas nails the simplicity-it's easy to read and easy to implement. We wanted to build on that spirit while tackling some of the challenges showing up in this thread: nested canvases, extensibility for custom app data, text styling, coordinate systems, and round-tripping between different canvas apps without data loss.
OCIF v0.7.0 just came out. It's designed to be an interchange format — so different canvas tools (Excalidraw, TLDraw, Obsidian, etc.) can export/import each other's canvases.
Some highlights:
- Extensible: apps can attach their own data via extensions, so nothing gets lost even if the features aren't supported
- Nested canvases via parent-child node relationships
- Local coordinate systems (addresses the pixel positioning concerns raised in another comment here)
- Text styling, viewport control, and more via built-in extensions
If JSON Canvas isn't quite meeting your needs, OCIF[1] might be worth a look.
Re: JSON Canvas Spec (2024)
#25I've used canvas quite a bit since it was release in Obsidian. It's good, not great, but the simplicity of the file type opens up a lot of opportunities to build on top of it.
What would make it great in your eyes?
Still the best option though!
Re: JSON Canvas Spec (2024)
#26Why use this instead of SVG?
Re: JSON Canvas Spec (2024)
#27Earlier quoted context omitted.
What would make it great in your eyes?
Not OP, but I use canvas all the time (Thank you!) in preference to something like Miro because I really value the open format and being able to keep the file. Something that really holds me back is the inability to use different shapes for the nodes - a use case for me is creating flow charts and process diagrams, so being unable to use the standard shapes for those is a challenge. Still the best option though!
Re: JSON Canvas Spec (2024)
#28Earlier quoted context omitted.
ah ok, sorry about that. I didn't really look at that part of the UI much, noticed it had some zoom stuff, noticed I couldn't zoom normally and scroll to where I wanted to read, was somewhat miffed.
Curious to know what “zoom normally” means for you. For me, it’s ctrl+mouse wheel or maybe two finger pinch/pull on trackpad. I am thoroughly confused as to why GitHub’s mermaid integration doesn’t seem to support any zoom outside of the overlay controls which…ick
Re: JSON Canvas Spec (2024)
#29Re: JSON Canvas Spec (2024)
#30I feel like this page does a good job of telling me nothing. It's a representation of a graph? Where each node can be a text string or a file or a URL or a container of other nodes? And somehow these links and files and containers have a color? What is the purpose of this? Why would I want my file to be blue?