Giter Club home page Giter Club logo

cyeditor's People

Contributors

demonray avatar fischerq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cyeditor's Issues

how to export to json then re-import?

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

Add license

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.