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
* Add image download and callback functionality
* Minor updates
* Make api more concise
* Update changelog
* Add JSON
* Revert "Add JSON"
This reverts commit 4fa1fed.
* Compile js and python files
* Compile js and python files (add files this time)
* added example app to test image generation
* modified setup.py to include utils in modified package
* added cytoscape-svg as extension
* extended cytotscape react to enable svg export,added example app to test imageDownload
* renamed buttons in example app
* rebuild it using yarn fixed compound nodes issue
* updated changelog, moved examples into demos/, updated E-mails in package.json
* updated comments in Cytoscape.react.js, added usage-image-export.py based on usage-event.py
* added usage-image-export.py to test_usage
* moved cytoscape-svg into extra_index.js
* resolved code linting issues
* added usage-image-export gif to README
* added random print statement in usage-image-export.py to pass pylint
Co-authored-by: Christian Legaspi <[email protected]>
Copy file name to clipboardExpand all lines: dash_cytoscape/Cytoscape.py
+44-21Lines changed: 44 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ class Cytoscape(Component):
12
12
- id (string; optional): The ID used to identify this component in Dash callbacks.
13
13
- className (string; optional): Sets the class name of the element (the value of an element's html
14
14
class attribute).
15
-
- style (dict; optional): Add inline styles to the root element.
16
-
- elements (list; optional): A list of dictionaries representing the elements of the networks.
15
+
- style (dict; default {width: '600px', height: '600px'}): Add inline styles to the root element.
16
+
- elements (list of dicts; optional): A list of dictionaries representing the elements of the networks.
17
17
1. Each dictionary describes an element, and specifies its purpose.
18
18
- `group` (string): Either 'nodes' or 'edges'. If not given, it's automatically inferred.
19
19
- `data` (dictionary): Element specific data.
@@ -32,7 +32,7 @@ class attribute).
32
32
- `classes` (string): Space separated string of class names of the element. Those classes can be selected by a style selector.
33
33
34
34
2. The [official Cytoscape.js documentation](http://js.cytoscape.org/#notation/elements-json) offers an extensive overview and examples of element declaration.
35
-
- stylesheet (list; optional): A list of dictionaries representing the styles of the elements.
35
+
- stylesheet (list of dicts; optional): A list of dictionaries representing the styles of the elements.
36
36
1. Each dictionary requires the following keys:
37
37
- `selector` (string): Which elements you are styling. Generally, you select a group of elements (node, edges, both), a class (that you declare in the element dictionary), or an element by ID.
38
38
- `style` (dictionary): What aspects of the elements you want to modify. This could be the size or color of a node, the shape of an edge arrow, or many more.
@@ -42,7 +42,7 @@ class attribute).
42
42
exhaustively documented in the Cytoscape.js docs. Although methods such
43
43
as `cy.elements(...)` and `cy.filter(...)` are not available, the selector
44
44
string syntax stays the same.
45
-
- layout (dict; optional): A dictionary specifying how to set the position of the elements in your
45
+
- layout (dict; default {name: 'grid'}): A dictionary specifying how to set the position of the elements in your
46
46
graph. The `'name'` key is required, and indicates which layout (algorithm) to
47
47
use.
48
48
1. The layouts available by default are:
@@ -80,33 +80,33 @@ class attribute).
80
80
Note that certain keys are not supported in Dash since the value is a
81
81
JavaScript function or a callback. Please visit [this issue](https://github.com/plotly/dash-cytoscape/issues/25)
82
82
for more information.
83
-
- pan (dict; optional): Dictionary indicating the initial panning position of the graph. The
83
+
- pan (dict; default {x: 0, y: 0}): Dictionary indicating the initial panning position of the graph. The
84
84
following keys are accepted:
85
85
- `x` (number): The x-coordinate of the position.
86
86
- `y` (number): The y-coordinate of the position.
87
-
- zoom (number; optional): The initial zoom level of the graph. You can set `minZoom` and
87
+
- zoom (number; default 1): The initial zoom level of the graph. You can set `minZoom` and
88
88
`maxZoom` to set restrictions on the zoom level.
89
-
- panningEnabled (boolean; optional): Whether panning the graph is enabled (i.e., the position of the graph is
89
+
- panningEnabled (boolean; default True): Whether panning the graph is enabled (i.e., the position of the graph is
90
90
mutable overall).
91
-
- userPanningEnabled (boolean; optional): Whether user events (e.g. dragging the graph background) are allowed to
91
+
- userPanningEnabled (boolean; default True): Whether user events (e.g. dragging the graph background) are allowed to
92
92
pan the graph.
93
-
- minZoom (number; optional): A minimum bound on the zoom level of the graph. The viewport can not be
93
+
- minZoom (number; default 1e-50): A minimum bound on the zoom level of the graph. The viewport can not be
94
94
scaled smaller than this zoom level.
95
-
- maxZoom (number; optional): A maximum bound on the zoom level of the graph. The viewport can not be
95
+
- maxZoom (number; default 1e50): A maximum bound on the zoom level of the graph. The viewport can not be
96
96
scaled larger than this zoom level.
97
-
- zoomingEnabled (boolean; optional): Whether zooming the graph is enabled (i.e., the zoom level of the graph
97
+
- zoomingEnabled (boolean; default True): Whether zooming the graph is enabled (i.e., the zoom level of the graph
98
98
is mutable overall).
99
-
- userZoomingEnabled (boolean; optional): Whether user events (e.g. dragging the graph background) are allowed
99
+
- userZoomingEnabled (boolean; default True): Whether user events (e.g. dragging the graph background) are allowed
100
100
to pan the graph.
101
-
- boxSelectionEnabled (boolean; optional): Whether box selection (i.e. drag a box overlay around, and release it
101
+
- boxSelectionEnabled (boolean; default False): Whether box selection (i.e. drag a box overlay around, and release it
102
102
to select) is enabled. If enabled, the user must taphold to pan the graph.
103
-
- autoungrabify (boolean; optional): Whether nodes should be ungrabified (not grabbable by user) by
103
+
- autoungrabify (boolean; default False): Whether nodes should be ungrabified (not grabbable by user) by
0 commit comments