473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Not getting mouse X/Y for onDragEnd

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
Dec 27 '07 #1
1 2002
On Dec 27, 12:05 pm, Christoph <christoph.bo...@gmail.comwrote:
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.
thnx,
Christoph
Dec 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Harlin Seritt | last post by:
I have the following script. Two widgets call the same function. How can I tell inside of the called function which button called it?: def say_hello(): print 'hello!' print widget root =...
6
by: CoreyMas | last post by:
Hello All, Here is what I would like to do I am creating a game program that displays a map (preferably in hexes but that is another matter) and whenever the user is over the "map" I want to...
5
by: Tim Bücker | last post by:
Hello. I have a window form with some panels on it. In one panel I am using the OnMouseDown and OnMouseUp events. MouseDown initiates some things and MouseUp releases some things - so it is...
7
by: Tyron | last post by:
I need to know if the Left Button of the Mouse is clicked in the WM_NCMOUSEMOVE Notification but this Message doesnt contain the Mouse Button States as WM_MOUSEMOVE does. So how can I get them? ...
2
by: mwatcher | last post by:
Hi all, I am using .net 2.0. How can I get the current state of the mouse button (e.g.. Mouse Button Right is pressed). I'm not in a mouse event handler routine. What I wanna do is to check if...
3
by: Andrzej | last post by:
I have a picturebox on my C# .NET form. The picturebox size mode is set to zoom. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
2
by: remya1000 | last post by:
i'm using VB.NET. when a button is clicked the utility will display an hour glass mouse pointer, and it will begin copying the Utility settings from one computer to another computer on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.