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
Copy file name to clipboardExpand all lines: CYLEAFLET.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,24 +23,27 @@ Under the hood, an instance of CyLeaflet consists of:
23
23
24
24
## Files
25
25
26
-
CyLeaflet functionality is dimplemented in the following files:
26
+
CyLeaflet functionality is implemented in the following files:
27
27
28
28
1.`dash_cytoscape/CyLeaflet.py`: CyLeaflet class definition, instantiation of underlying Cytoscape and Leaflet components, layout and styling to align the two canvases, and registration of clientside callbacks
29
29
2.`src/lib/cyleaflet_clientside.js`: Clientside callback function implementations
Purpose: Ensures that the nodes remain in the same places on the map whenever the view is zoomed or dragged. Whenever the Cytoscape view changes, this callback updates the Leaflet view to match.An additional output, the Leaflet invalidateSize property, ensures the map gets refreshed properly.
43
+
Purpose: Ensures that the nodes remain in the same places on the map whenever the view is zoomed or dragged. Whenever the Cytoscape view changes, this callback updates the Leaflet view to match.An additional output, the Leaflet `invalidateSize` property, ensures the map gets refreshed properly.
41
44
42
45
-**Update Cytoscape graph elements**
43
46
- Input: dcc.Store `data` property
44
47
- Output: Cytoscape `elements` property
45
48
46
-
Purpose: Provides a way for the Dash developer to update the graph elements displayed in Cytoscape. This callback transforms the lat and lon coordinates specified in the node data into a corresponding (x, y) canvas position that will align with the map.Updating the Cytoscape nodes directly does not work, because this skips the transformation step, and the nodes will not appear in the correct map positions.
49
+
Purpose: Provides a way for the Dash developer to update the graph elements displayed in Cytoscape. This callback transforms the `lat` and `lon` coordinates specified in the node data into a corresponding (x, y) canvas position that will align with the map.Updating the Cytoscape nodes directly does not work, because this skips the transformation step, and the nodes will not appear in the correct map positions.
0 commit comments