New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elements prop is unable to accept objects #2
Comments
This is expected behaviour. While the core lib accepts either the So this React component only supports the preferred The Tokyo railway example had its JSON generated from an export from the Cytoscape Java desktop app. Unfortunately, the Java JSON exporter isn't up-to-date and it uses the old format. However, that is something that the Cytoscape Consortium is working on. |
That makes sense, thank you! I'll try out the updated examples by the Consortium once they solved the problem! |
@xhlulu After further analysis, it may not be practical to drop support for the You can try it in v1.1.0 |
Description
I tried to work through a few examples, and one problem that came up was that the element prop of the react version only accepts an array of objects, whereas the original implementation accepts both arrays and objects. Particularly, objects contain specifications for
nodes
andedges
, for example:Whereas the only format accepted (for the element prop) is the following:
Here's an example of
elements
in the object (1st) formatHere's an example of
elements
in the list (2nd) format.Files
data.json
is directly downloaded from the tokyo railway exampleApp.js
is written as such:Error Output
The console output error is:
Here is the screenshot of react app output:
Reproducing Error
Steps toward reproducing the error in command line:
The text was updated successfully, but these errors were encountered: