We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bba80f8 + 0a802dc commit fd203efCopy full SHA for fd203ef
plugins/sigma.plugins.dragNodes/sigma.plugins.dragNodes.js
@@ -149,7 +149,11 @@
149
function nodeMouseDown(event) {
150
_isMouseDown = true;
151
var size = _s.graph.nodes().length;
152
- if (_node && size > 0) {
+
153
+ // when there is only node in the graph, the plugin cannot apply
154
+ // linear interpolation. So treat it as if a user is dragging
155
+ // the graph
156
+ if (_node && size > 1) {
157
_mouse.removeEventListener('mousedown', nodeMouseDown);
158
_body.addEventListener('mousemove', nodeMouseMove);
159
_body.addEventListener('mouseup', nodeMouseUp);
0 commit comments