Open shadiakiki1986 opened 3 years ago
Wow, great issue! Thank you for testing with all of these @shadiakiki1986 :)
Ok, I think of two things when I read your issue:
ipycytoscape
deps. They're both on the package.json
+ imported on the typescript side. So, I'd say a good thing to try would be adding one of these other packages to the packagejson and importing it on the widget.ts
file, like we do with ipycytoscape-cola
for example.css/widget.css
file where these changes can be made. Or maybe we have to create a new file to make it cleaner? If this approach is taken we should check what other bigger more complex widgets (like bqplot for example) are doing and copy them.For now I can't really tackle this, but I'm always around to answer questions and help any other way I can, both here and on gitter: https://gitter.im/QuantStack/Lobby
It is not that they are not centered, but that since they are not part of the package the graph breaks and all nodes are set in the upper-left corner of the canvas. They are all on top of each other.
The real issue here is that we should add more layouts to the Python package.
Bug report
Bug summary
Using several layout algorithms result in a graph that is not centered. Below code snippet contains list of which ones yield centered graphs and which don't.
Code for reproduction
Actual outcome
COLA (centered):
ASVDF (not centered):
Expected outcome
Centered graph
Update: initially I filed this for ASVDF, but it turns out many algos have this issue