Giter Club home page Giter Club logo

Comments (6)

kinimesi avatar kinimesi commented on July 20, 2024

Not rendered in the exported SVG or in Cytoscape canvas?

It shouldn't interfere with Cytoscape canvas. Can you provide a reproducible demo, please?

from cytoscape-svg.

KevinZhou1 avatar KevinZhou1 commented on July 20, 2024

It is not rendered in the exported svg. We are doing the following to save the svg:

SELECTED_PROJECT
TOO_MANY_PROJECT
TERMINAL_PROJECT
DEFAULT_PROJECT
var svg = document.createElement("a"); document.body.appendChild(svg); svg.style = "display: none"; svg.href = URL.createObjectURL(new Blob([this.cy.svg({full: true, scale: 0.5})], {type: 'image/svg+xml'})); svg.download = this.state.downloadName; svg.click(); window.URL.revokeObjectURL(svg.href); svg.parentNode.removeChild(svg);

It is working but is not displaying the images correctly on some of the nodes, specifically we have different node images that represent whether a node is selected, terminal, or have many dependencies. Although we can see it on the canvas, we cannot see it when we export it as svg.

The first two icons (png) are not working (highlighted yellow and have the kg symbol), the bottom two are appearing in the svg. I have also tried switching theses nodes images around no matter what, I could not get them to appear. Let me know if there is anything else I can provide.

from cytoscape-svg.

kinimesi avatar kinimesi commented on July 20, 2024

It should be fixed with kinimesi/canvas2svg@29d64b6 and 96da563

Can you test it with the master branch and verify please?

from cytoscape-svg.

KevinZhou1 avatar KevinZhou1 commented on July 20, 2024

Thank you so much ! It is working now. My team greatly appreciates your efforts

from cytoscape-svg.

KevinZhou1 avatar KevinZhou1 commented on July 20, 2024

When can npm be updated to include the latest code? In order to fix the bug, I have to manually clone and copy it to the node_modules folder since npm still fetches the older one

from cytoscape-svg.

kinimesi avatar kinimesi commented on July 20, 2024

Released as v0.2.0

PS: you can directly add the GitHub repository to your package.json as well instead of manual copying. Related NPM doc.

{  
"dependencies": {
    "cytoscape-svg": "kinimesi/cytoscape-svg#master"
 }
}

from cytoscape-svg.

Related Issues (12)

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.