{ const { handler, box } = e.detail; e.preventDefault() handler.move(box.x - (b" /> { const { handler, box } = e.detail; e.preventDefault() handler.move(box.x - (b" /> { const { handler, box } = e.detail; e.preventDefault() handler.move(box.x - (b"/>

No details on "Event" SVG JS

20 Views Asked by At

I'm trying to get drag drop to work.

rect.on("dragend.namespace", e => {
    const { handler, box } = e.detail;
    e.preventDefault()
          
    handler.move(box.x - (box.x % 50), box.y - (box.y % 50))
})

From the docs. But I'm getting

Property 'detail' does not exist on type 'Event'.ts(2339) any

The properties e does have are from an Event defined in node_modules\typescript\lib, not the one in \node_modules@svgdotjs\svg.js.

Could I have configured something incorrectly? I am using Typescript.

0

There are 0 best solutions below