4teamwork / cypress-drag-drop

A cypress child command for drag'n'drop support.
GNU General Public License v3.0
167 stars 45 forks source link

Dragging a non-DOM element? #45

Open jayarjo opened 3 years ago

jayarjo commented 3 years ago

What about dragging a non-DOM element, for example a dot drawn on the canvas? Same events, mousedown at a particular point, mousemove, mouseup, however no DOM element.

carlosjpr-collab commented 3 years ago

any news ?

DJTaopix commented 2 months ago

@jayarjo @carlosjpr-collab , I have got this working fine dragging objects around inside of a canvas. I use the dom element cavas as my selector for both the target and source, then use the x and y position options to tell it where to drag from and too. I have a function that gets a shape's x and y from the shape ref and stage. I hope this helps y'all.