cytoscape js and Long id

8 views
Skip to first unread message

victor...@gmail.com

unread,
Oct 10, 2018, 2:50:14 PM10/10/18
to cytoscape-helpdesk
JS doesn't support Long numbers and I have id's which are Long from an Oracle DB. I'll try to change it to not be Long but in the case where I can't, what did others do?

1) There are some Long js implementations which I can use such as BigNumber.js. I can use it in my code, but I think when I do a cy.add then it will be converted to a 53bits and I'll lose precision? This will be an issue when I view the properties of a vertex as the id will not be correct. This will also be an issue since it is truncated there maybe collision and vertex and edges will be incorrect.

2) I can convert it to a string when I get the data. I don't want there to be confusion so when I display the id or use it for searching I'll need to convert it back to a Long. Seems like a lot of hacks everywhere.

David Otasek

unread,
Oct 11, 2018, 11:10:45 AM10/11/18
to cytoscape-helpdesk
Hello,

This forum is for the Cytoscape desktop application. Cytoscape JS questions are answered here.

Thank you,

David Otasek
Reply all
Reply to author
Forward
0 new messages