0

I'm using react-konva and I'm trying to add connector lines between circles by dragging from one circle and then dropping it on the other circle to be connected. So far I have tried it by clicking the circles to create a line between them and made it draggable as a group. Here's the CodeSandBox. Any help is appreciated

mplusr
  • 151
  • 15
  • Could you explain what is not working as you expect please ? As far as I can see from your demo what you have described as the desired result is working. – Vanquished Wombat Sep 11 '20 at 10:57
  • @VanquishedWombat Instead of clicking on the circles, I want to drag a line from circleA and drop it on circleB to connect them together – mplusr Sep 11 '20 at 11:25
  • I'll leave this here in case anyone is looking for an answer in the future. https://stackoverflow.com/questions/57498329/how-to-connect-2-objects-using-a-line-using-konvajs-in-vuejs – mplusr Sep 12 '20 at 07:32
  • See my question + self answer [here](https://stackoverflow.com/questions/63858947/how-to-use-event-listeners-efficiently-when-there-are-potentially-very-many-shap) which draws lines between shapes as the user drags and 'jumps' the connecting line to an overlapped shape when that happens. Maybe you can adapt it. – Vanquished Wombat Sep 12 '20 at 09:43

0 Answers0