How to drag and edit shapes?

Hello! I’m working on the dot shart with some shapes on it. I need to drag and edit shapes.
I tried to use solutions from demos in similar topics, but when I try to apply this code in my project - it’s not working.
The shapes are no longer interactive and I can’t do anything with them.

I am working on React and using Plotly via CDN.
I have no idea how I can implement this functionality, so I would appreciate any help :sweat_smile: