force-graph 1.49.3 → 1.49.4

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.
@@ -1479,10 +1479,12 @@ var forceGraph = Kapsule({
1479
1479
  c.translate(t.x, t.y);
1480
1480
  c.scale(t.k, t.k);
1481
1481
  });
1482
+ state.isPointerDragging = true;
1482
1483
  state.onZoom && state.onZoom(_objectSpread2(_objectSpread2({}, t), _this.centerAt())); // report x,y coordinates relative to canvas center
1483
1484
  state.needsRedraw = true;
1484
1485
  }).on('end', function (ev) {
1485
- return state.onZoomEnd && state.onZoomEnd(_objectSpread2(_objectSpread2({}, ev.transform), _this.centerAt()));
1486
+ state.isPointerDragging = false;
1487
+ state.onZoomEnd && state.onZoomEnd(_objectSpread2(_objectSpread2({}, ev.transform), _this.centerAt()));
1486
1488
  });
1487
1489
  adjustCanvasSize(state);
1488
1490
  state.forceGraph.onNeedsRedraw(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "force-graph",
3
- "version": "1.49.3",
3
+ "version": "1.49.4",
4
4
  "description": "2D force-directed graph rendered on HTML5 canvas",
5
5
  "type": "module",
6
6
  "unpkg": "dist/force-graph.min.js",
@@ -488,10 +488,14 @@ export default Kapsule({
488
488
  c.translate(t.x, t.y);
489
489
  c.scale(t.k, t.k);
490
490
  });
491
+ state.isPointerDragging = true;
491
492
  state.onZoom && state.onZoom({ ...t, ...this.centerAt() }); // report x,y coordinates relative to canvas center
492
493
  state.needsRedraw = true;
493
494
  })
494
- .on('end', ev => state.onZoomEnd && state.onZoomEnd({ ...ev.transform, ...this.centerAt() }));
495
+ .on('end', ev => {
496
+ state.isPointerDragging = false;
497
+ state.onZoomEnd && state.onZoomEnd({ ...ev.transform, ...this.centerAt() });
498
+ });
495
499
 
496
500
  adjustCanvasSize(state);
497
501