You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.
If I understand the cytoscape.js doc correctly, one should set curve-style to "Bezier" (or something different than 'haystack') if one wants to see arrows.
Now from py2cytoscape, I do not see any VisualProperty that would set this value in my style. Reason for this probably is that cytoscape itself does not have this property, so cyREST does not have it either ...
Below is a minimal example (not tested, but you get an idea of what I mean) for some CyNetwork net1.
cy.layout.apply(name="force-directed", network=net1)
cy.layout.fit(network=net1)
#this gets the Directed style from cytoscape via REST api and shows in cytoscape WITH ARROWS!
my_style = cy.style.create('Directed')
#this transforms the cytoscape style to json for cytoscape.js
style_for_widget = cy.style.get(my_style.get_name(), data_format='cytoscapejs')
cy.style.apply(style=my_style, network=net1)
#quick and dirty fix for the API problem
#style_for_widget['style'][2]['css']['curve-style'] = 'bezier'
#this shows a nice cytoscape.js graph WITHOUT arrows
renderer.render(net1.get_first_view(), layout_algorithm="cose", style=style_for_widget['css'], background='#FFFFFF')
I wonder whether this is intended behaviour or not? For sure one can fix this by directly setting the curve-style for cytoscape.js - but that is kind of ugly in my opinion ...
Maybe adding a dummy VisualProperty could help - that might be stored locally (in python) and added once the style is asked for in cytoscapejs format (style_util .get or so).
Cheers,
Markus
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
If I understand the cytoscape.js doc correctly, one should set curve-style to "Bezier" (or something different than 'haystack') if one wants to see arrows.
Now from py2cytoscape, I do not see any VisualProperty that would set this value in my style. Reason for this probably is that cytoscape itself does not have this property, so cyREST does not have it either ...
Below is a minimal example (not tested, but you get an idea of what I mean) for some CyNetwork net1.
I wonder whether this is intended behaviour or not? For sure one can fix this by directly setting the curve-style for cytoscape.js - but that is kind of ugly in my opinion ...
Maybe adding a dummy VisualProperty could help - that might be stored locally (in python) and added once the style is asked for in cytoscapejs format (style_util .get or so).
Cheers,
Markus
The text was updated successfully, but these errors were encountered: