5 ms·
The github project itself is at https://github.com/sbussard/canvas-sketch https://github.com/sbussard/canvas-sketch Question: how do you save/load? We had a s
by davidjgraph 8y ago
The github project itself is at https://github.com/sbussard/canvas-sketch https://github.com/sbussard/canvas-sketch
Question: how do you save/load?
We had a similar idea for draw.io [1]
[1] https://www.draw.io/?splash=0&url=https://raw.githubusercontent.com/jgraph/drawio-diagrams/master/templates/business/business_model_canvas_1.xml https://www.draw.io/?splash=0&url=https://raw.githubusercont...
- realPubkey 8y agoThe whole state json-stringified and then stored as base64 in the localstorage. Looks like a valid solution for that amount of data.
- TeMPOraL 8y agoI think the question should be restated as: how do you save to a file and load from a file? The use of localStorage means you can only have one version of a canvas per browser/device pair.
- todd3834 8y agoMaybe not ideal but you _could_ use the browser inspector and copy the data from local storage and send it around manually. Not suggesting this is a workable solution but if you just needed to get it off one computer to another.
- Gcam 8y agoCould just offer downloading the data as JSON in a file as well as having it in local storage?
- numbsafari 8y agoCreate a gist and support loading from a gist URL? It's shareable between devices and people, and even editable if you pretty-print the JSON, rather than base64 encoding it. I would probably support both options. https://developer.github.com/v3/gists/#create-a-gist https://developer.github.com/v3/gists/#create-a-gist
- sleepychu 8y agoput my contact info in a public gist and say goodbye to me as a business partner.
- numbsafari 8y agoYeah, good point. You can make the gist non-public by default (set public=false), and perhaps gists are the wrong tool, but something akin to gists seem like a good way to do something like this. I know Dave Winer was using the DropBox API in this way for some of his outlining tools. But your point is well made, one of the downsides of the "web" as a platform is that it's hard to know what happens with the data you save to a random web application. I've had experience with product managers loading entire customer lists of emails into random "email validation tool"s, which were clearly just honeypots for foolish people's data.
- pspeter3 8y agoWhy convert to Base64?
- sbussard 8y agoA former version of the app I made a few years ago had the ability to download a json file with all your data. Then to open you would just drag the file from your computer and drop it on the canvas. But that obviously didn't work for mobile
- davidjgraph 8y agoCopy JSON to clipboard function?
- sbussard 8y agobrilliant!
- ddgflorida 8y agoThis project could easily use FileSaver.js to download the JSON locally. You could then easily read it back. This is how I do it for my site that runs locally only.
- desireco42 8y agoI can't speak for the author, but I bet he would accept Pull Req if you made one :)
- aepc2 8y agoJust quick off topic: i use draw.io often. It's the best tool for mockups etc that I've come across, all things considered. Thx.