0

I am trying to drag a div onto a target. When dropping the item I want to position it on the target at the position it was dropped.

I need to use dojo dnd. The problem i am having is finding the position where I have dropped the item so that I can update the dropped items position.

Where can I access the dropped position from?

I tried to subscribe to the dojo drop event:

            dojo.subscribe("/dnd/drop", function(a,b){

            var i = dojo.create("div",{
                style:"position:absolute; top:"+a._lastY+";left:"+a._lastX+"; height:20px; width:20px; background-color:blue;",
            });
            dojo.place(i, query("body")[0]);
        });

the only positions I could find were lastX and lastY.

Any help would be brilliant!

Thanks,

Westy10101
  • 861
  • 2
  • 12
  • 25

0 Answers0