react-grid-layout / react-draggable

React draggable component
MIT License
9.04k stars 1.03k forks source link

Draggable doesn't work with SVG elements as they are not an instance of HTMLElement interface but Element interface #733

Open sureshungarala opened 1 year ago

sureshungarala commented 1 year ago

Firstly, thanks for this awesome easily extensible library.

Description

I am using draggable on SVGElements like group(g) with parent as svg tag element. Bounds doesn't work with value parent on them and even if bounds was set to outer HTMLElement like div, bounds is not working as expected as the offsetLeft & offsetTop exist only on HTMLElement and not on Element or SVGElement interfaces. This is a blocker for SVG elements.