Skip to content

Commit

Permalink
Few Updates and Types
Browse files Browse the repository at this point in the history
  • Loading branch information
syedzayyan committed Mar 11, 2024
1 parent d922f41 commit 96b52b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/tools/toolComp/ScaffoldNetworkWholeGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ const GraphEvents: React.FC = () => {
touchmove: (e) => {
if (draggedNode) {
// Get new position of node
// @ts-ignore
const pos = sigma.viewportToGraph(e);
sigma.getGraph().setNodeAttribute(draggedNode, "x", pos.x);
sigma.getGraph().setNodeAttribute(draggedNode, "y", pos.y);

// Prevent sigma to move camera:
// @ts-ignore
e.preventSigmaDefault();
e.original.preventDefault();
e.original.stopPropagation();
Expand Down

0 comments on commit 96b52b6

Please sign in to comment.