cytoscape / cx2js

A CX to Cytoscape JS library
MIT License
3 stars 1 forks source link

Implement NODE_CUSTOMGRAPHICS #7

Open dotasek opened 6 years ago

dotasek commented 6 years ago

The Cytoscape NODE_CUSTOMGRAPHICS needs implementation.

dotasek commented 6 years ago

Cytoscape uses it’s own packaged image files, unique to each session, and references them, while Cytoscape js uses URLs. It may be to export the relevant files from Cytoscape while building an export, but this is an extra export and outside of the JSON itself. Cytoscape js uses many properties to define the behaviour of background-image; setting these correctly might give us something reasonably close to Cytoscape behaviour IF we get an image to point to.

dexterpratt commented 6 years ago

I think this is one of the most pressing style issues to get on the table for discussion, certainly needs some mention in the mini-retreat agenda. It is complicated to reconcile the session-oriented view of the world with a document-centric paradigm in this case. For example, if I save to CX and then re-import, presumably the images in the re-imported network are separate. So there would be multiple copies of the images if you looked in the image manager, right? Hmmm...looking at what is in my imagemanager, maybe I don't understand this.

dexterpratt commented 6 years ago

I see that StringApp uses a column "STRING style" containing data urls as a passthrough- but the chemviz structures that are supposedly a passthrough in the image/Chart 2 style do not have a comparable column, there is a warning on the style. But it works anyway. So are the glassballs portable but the structures not, just a special effect of the string app? Gack! It looks like the glassball overlay is redundantly included for every node, rather than referencing a single data url stored as part of the network. Does cytoscape.js have a way to re-use the same data url multiple times?