demonray / cyeditor Goto Github PK
View Code? Open in Web Editor NEWcyeditor, a flow chart editor build with cytoscape.js
Home Page: https://demonray.github.io/cyeditor/
License: MIT License
cyeditor, a flow chart editor build with cytoscape.js
Home Page: https://demonray.github.io/cyeditor/
License: MIT License
Hello Sir,
To save/export as JSON, I tried changing the save function to:
async save () {
try {
let blob = await this.cy.json(false, 'elements')
if (window.navigator.msSaveBlob) {
window.navigator.msSaveBlob(blob, `chart-${Date.now()}.json`)
} else {
let a = document.createElement('a')
a.download = `chart-${Date.now()}.json`
a.href = window.URL.createObjectURL(blob)
a.click()
}
} catch (e) {
console.log(e)
}
}
but I get an error about the createObjectURL
:
TypeError: URL.createObjectURL: Argument 1 is not valid for any of the 1-argument overloads.
save index.js:513
_handleCommand index.js:359
_loop2 cytoscape.cjs.js:10505
trigger cytoscape.cjs.js:10517
forEachEventObj cytoscape.cjs.js:10401
trigger cytoscape.cjs.js:10475
emit cytoscape.cjs.js:14157
command index.js:59
_initEvents index.js:62
Toolbar index.js:32
default index.js:140
_initPlugin index.js:245
_init index.js:43
CyEditor index.js:36
mounted cyeditor.js:38
VueJS 11
<anonymous> main.js:8
js app.js:864
__webpack_require__ app.js:724
fn app.js:101
1 app.js:1995
__webpack_require__ app.js:724
<anonymous> app.js:791
<anonymous> app.js:794
How would I add export to JSON and import as JSON buttons?
Thank you
Hi,
It would be nice if you could add a license so code in this repository could be reused.
A lot of the code in this repository could be really useful to me, though I am currently not sure to what extend I can use it.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.