I am working on a project in which I want to draw a line around some SVG elements to make a selection of objects within an area.
Here is a screenshot of what I have now. I used Paint to add a line so that it is completely clear what I am trying to achieve. I want to select two rectinside the drawn circle.

I see a series of steps that need to be addressed:
- Create an item
pathin mousedownand record the mouse movements untilmouseup - Close
pathif user didn’t draw a circle - Find SVG elements that are fully or partially inside the circle
What approaches do you see and do you have any recommendations on how to do this?
D3.js. ( , D3) .