Chiming
Chiming

Reputation: 1

How can I draw a Polyline from a svg => g => svg => rect (responsive) to an Dom Element on the right side (SVG.js)?

i have below layout:

<container>
<left>
<svg style="width: 100%; height: 100%">
   <g>
       <svg>
        <image />
        <rect />
       </svg>
   </g>
</svg>
</left>
<right>
   <item id="item-1" />
   <item id="item-2" />
</right>
</container>

Want to click rect and draw a polyline to item-1. Stuck in the position of right item top.

Anyone can give me a tips? I would be very grateful.

enter image description here

Have tried bbox, getBoundingClientRect, all are not correct.

Upvotes: 0

Views: 13

Answers (0)

Related Questions