Not getting mouse X/Y for onDragEnd

C

Christoph

I've got a drag source and a drop target. They are set up thusly:

var oDragSource = new dojo.dnd.HtmlDragSource(oDragRow, "layoutRow");
oDragSource.onDragEnd = function( e ) { console.log( 'onDragEnd: ' );
console.log( e ); }

var oTargetRow = new dojo.dnd.HtmlDropTarget(oContainer, "layoutRow");
oTargetRow.onDrop = function( e ) { console.log( 'onDrop: ' );
console.log( e ); }

When the onDrop is triggered, the mouse coordinates are set correctly.
However, when the onDragEnd is triggered, the mouse coordinates are
set to 0,0. Is there a reason for that? Why can I not get the mouse
position when onDragEnd is triggered? I've done some searching on
Google and I haven't run across anything that tells me it works in one
case but not the other. In both cases, I'm shown that it's a "mouseup"
event in firebug's console. However, for onDragEnd, it's always
showing "clientX=0, clientY=0".

Am I doing something wrong?

thnx,
Christoph
 
D

dhtmlkitchen

I've got a drag source and a drop target. They are set up thusly:

var oDragSource = new dojo.dnd.HtmlDragSource(oDragRow, "layoutRow");
oDragSource.onDragEnd = function( e ) { console.log( 'onDragEnd: ' );
console.log( e ); }

var oTargetRow = new dojo.dnd.HtmlDropTarget(oContainer, "layoutRow");
oTargetRow.onDrop = function( e ) { console.log( 'onDrop: ' );
console.log( e ); }

When the onDrop is triggered, the mouse coordinates are set correctly.
However, when the onDragEnd is triggered, the mouse coordinates are
set to 0,0. Is there a reason for that? Why can I not get the mouse
position when onDragEnd is triggered? I've done some searching on
Google and I haven't run across anything that tells me it works in one
case but not the other. In both cases, I'm shown that it's a "mouseup"
event in firebug's console. However, for onDragEnd, it's always
showing "clientX=0, clientY=0".

Am I doing something wrong?
Try the dojo forums on dojotoolkit.org.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top