graph_widget 0.1.6__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graph_widget-0.1.6 → graph_widget-0.1.8}/PKG-INFO +1 -1
- {graph_widget-0.1.6 → graph_widget-0.1.8}/pyproject.toml +1 -1
- {graph_widget-0.1.6 → graph_widget-0.1.8}/src/graph_widget/static/widget.js +13 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/uv.lock +1 -1
- {graph_widget-0.1.6 → graph_widget-0.1.8}/.gitignore +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/.python-version +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/README.md +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/README_DEV.md +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/bug_test.py +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/data.json +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/dev.py +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/example_2.py +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/multi_mst.json +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/src/graph_widget/__init__.py +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/src/graph_widget/dev.py +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/src/graph_widget/static/widget.css +0 -0
- {graph_widget-0.1.6 → graph_widget-0.1.8}/vis-forge-marimo.py +0 -0
|
@@ -101,6 +101,15 @@ function render({ model, el }) {
|
|
|
101
101
|
colour_scale = undefined
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
if (colour_scale_type === "diverging") {
|
|
105
|
+
// Sort nodes by absolute distance from zero
|
|
106
|
+
data.nodes.sort((a, b) => {
|
|
107
|
+
const aVal = Math.abs(a[colour_feature]);
|
|
108
|
+
const bVal = Math.abs(b[colour_feature]);
|
|
109
|
+
return aVal - bVal;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
104
113
|
plot.nodeCanvasObject((node, ctx) => {
|
|
105
114
|
const radius = node_size * node_scale;
|
|
106
115
|
const isLocalSelected = local_selected_ids.includes(node.id);
|
|
@@ -117,6 +126,10 @@ function render({ model, el }) {
|
|
|
117
126
|
ctx.lineWidth = radius/5;
|
|
118
127
|
ctx.strokeStyle = 'red';
|
|
119
128
|
ctx.stroke();
|
|
129
|
+
} else {
|
|
130
|
+
ctx.lineWidth = 1;
|
|
131
|
+
ctx.strokeStyle = 'white';
|
|
132
|
+
ctx.stroke();
|
|
120
133
|
}
|
|
121
134
|
});
|
|
122
135
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|