HI ,
is there a way to restrict the movement of a node towards y axis only in cyctoscape dash .
import dash
import dash_cytoscape as cyto
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([
cyto.Cytoscape(
id='cytoscape-two-nodes',
layout={'name': 'preset'},
style={'width': '100%', 'height': '400px','line-color': 'red'},
elements=[
{'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 75, 'y': 75}},
{'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}},
{'data': {'source': 'one', 'target': 'two'}}
],
stylesheet=[
{
'selector': 'edge',
'style': {
'line-color': 'white'
}
}
]
)
])
if __name__ == "__main__":
app.run_server( port = 8052, debug=True)
If I want the nodes to move only towards y axis . Can someone help .
Thanks,
Meera