Skip to content

Commit

Permalink
set mouse drag position on mouse down
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Jan 6, 2024
1 parent a8c3ba7 commit a767a1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion interface/src/components/Graph/IO/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ export function usePin(pin: Accessor<Pin>) {
UI.setDraggingPin();
});
},
mousedown: () => {
mousedown: (e) => {
createRoot((dispose) => {
UI.setDraggingPin(thisPin);
UI.setMouseDragLocation({
x: e.clientX,
y: e.clientY,
});

onCleanup(() => UI.setDraggingPin());

Expand Down

1 comment on commit a767a1b

@vercel
Copy link

@vercel vercel bot commented on a767a1b Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.