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
* 🚫 Update Gitignore
* 📦 Add external layouts to package.json
Also update yarn.lock
* 🆕 Create extra_index.js to load external layouts
Update Cytoscape.react.js description as well
* Add new webpack configs + update build scripts
* 🚧 `npm run build:all`
* 🆕 Add `load_extra_layouts()` to dash_cytoscape
This function lets the user load the extra layouts by changing the global _js_dist
* 🆕 Create demos for new features
* 📷 Images for external layouts
* Update requirements.txt
* Update CHANGELOG.md
* Flake 8 on new demos
* Add docstring to load_extra_layouts()
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [Unreleased]
8
8
9
+
### Added
10
+
*`demos/usage-dag-edges.py`: Show different types of edges in a DAG
11
+
*`demos/usage-elements-extra.py`: Shows how to load external layouts, otherwise same app as `usage-elements.py`.
12
+
*`dash_cytoscape.load_extra_layouts()`: A new function that can be called before initializing the Dash app (`app = dash.Dash(__name__)`) to load the JS bundle containing the external layouts.
13
+
*`webpack.[dev|prod].extra.config.js`: Two new webpack configs for external layouts.
14
+
*`src/lib/extra_index.js`: Loads external layouts before exporting the `Cytoscape` class. Needed to generate the new bundles.
15
+
* Images of new external layouts.
16
+
*`dash_cytoscape/dash_cytoscape_extra.[min|dev].js`: New bundles containing the extra layouts. Those bundles are double in size compared to the default bundles. Therefore, they are only loaded when the user uses `load_extra_layouts()` to limit bandwidth usage and maximize loading speed. Please view [fast3g-cytoscape](demos/images/fast3g-cytoscape.PNG) for an example of the impact on loading time.
17
+
18
+
### Changed
19
+
*`src/lib/components/Cytoscape.react.js`: Updated description to include information about new external layouts.
20
+
*`package.json`: Added new builds for the extra layouts, modified `npm build:all` to include new builds. Added external layouts as dependencies.
3. The keys accepted by `layout` vary depending on the algorithm, but some
58
66
keys are accepted by all layouts:
59
67
- `fit` (boolean): Whether to render the nodes in order to fit the canvas.
60
68
- `padding` (number): Padding around the sides of the canvas, if fit is enabled.
61
69
- `animate` (boolean): Whether to animate change in position when the layout changes.
62
70
- `animationDuration` (number): Duration of animation in milliseconds, if enabled.
63
71
- `boundingBox` (dictionary): How to constrain the layout in a specific area. Keys accepted are either `x1, y1, x2, y2` or `x1, y1, w, h`, all of which receive a pixel value.
64
72
65
-
3. The complete list of layouts and their accepted options are available
66
-
on the [Cytoscape.js docs](http://js.cytoscape.org/#layouts).
73
+
4. The complete list of layouts and their accepted options are available
74
+
on the [Cytoscape.js docs](http://js.cytoscape.org/#layouts). For the
75
+
external layouts, the options are listed in the "API" section of the
76
+
README.
67
77
Note that certain keys are not supported in Dash since the value is a
68
78
JavaScript function or a callback. Please visit [this issue](https://github.com/plotly/dash-cytoscape/issues/25)
69
79
for more information.
@@ -151,16 +161,13 @@ class attribute).
151
161
- selectedNodeData (list; optional): The list of data dictionaries of all selected nodes (e.g. using
152
162
Shift+Click to select multiple nodes, or Shift+Drag to use box selection).
153
163
- selectedEdgeData (list; optional): The list of data dictionaries of all selected edges (e.g. using
154
-
Shift+Click to select multiple nodes, or Shift+Drag to use box selection).
155
-
156
-
Available events: """
164
+
Shift+Click to select multiple nodes, or Shift+Drag to use box selection)."""
0 commit comments