Skip to content

Commit

Permalink
chore(example): remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Sep 25, 2024
1 parent 658c349 commit cc56b43
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@ export default ({ toX, toY }) => {
const nodes = useNodes();
const selectedNodes = nodes.filter((node) => node.selected);

console.log(selectedNodes)

const handleBounds = selectedNodes.flatMap((userNode) => {
const node = getInternalNode(userNode.id);

// we only want to draw a connection line from a source handle
// we only want to draw a connection line from a source handle
if (!node.internals.handleBounds.source) {
return [];
}

return node.internals.handleBounds.source?.map((bounds) => ({
id: node.id,
positionAbsolute: node.internals.positionAbsolute,
bounds,
}));
})
});

return handleBounds.map(({ id, positionAbsolute, bounds }) => {
console.log(id, positionAbsolute, bounds)
const fromHandleX = bounds.x + bounds.width / 2;
const fromHandleY = bounds.y + bounds.height / 2;
const fromX = positionAbsolute.x + fromHandleX;
Expand Down

0 comments on commit cc56b43

Please sign in to comment.