oTree Forum >

Drag and Drop

#1 by sergiu

Hello everyone. I need to build a Drag'n Drop App for my experiment, 3 players use a video chat and together compose figures from a given set of images. My idea was to parse images' coordinates, but somehow I cannot achieve that: all images are placed at a same position somewhere on the top of the page. So I have the following questions:

1) Which coordinates I should send through live method? img.style.left/top or img.getBoundingClientRect()? 
2) How should I set these coordinates? 

Any help is welcome. If someone already implemented a drag'n drop app and can share the code, that would be awesome!

Write a reply

Set forum username