|
Rank: Newbie Groups: Member
Joined: 2/18/2011 Posts: 6
|
Hi,
I am trying to get the mouse x,y coordinates on a page using:
$(document).ready(onReady)
function onReady() { $(document).mousemove(function (e) { window.mouseXPos = e.pageX; window.mouseYPos = e.pageY; }); }
In order to see the coordinates I am using the following: $(document).mousemove(mouseMove);
function mouseMove() { $("#lbMessage").text(window.mouseXPos.toString() + "x" + window.mouseYPos.toString()); }
In this page I am using a calendar control. I noticed that when the mouse enters calendar cells, the mousemove event stops firing.
Do i need to make some kind of configuration of the calendar control?
Thank you
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The Calender control captures mouse move event and cancels it. Unfortunately I do not believe there is any setting that you can turn that off.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/18/2011 Posts: 6
|
Thank you for your reply. I managed to work around this limitation anyway by using DayRender event and passing some additional parameters.
Best regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Glad that you worked it out!
|
|
Rank: Newbie Groups: Member
Joined: 2/18/2011 Posts: 6
|
It seems that the workaround found is not as good :D. I was hoping to be able to extend Calendar's functionality using jQuery drag'n'drop plugins. I was planing to make some cells draggable and others dropable.
Is there any posibility to change the calendar's default behaviour of canceling the mousemove event?
Such a solution will really really be useful.
Thank you.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
No. I do not believe we have any plan to change the Calendar for this. Allowing the mouse click event to bubble up to the document would trigger a click event on the document, which would close all popup windows, including the DatePicker drop down window. So that will completely break the DatePicker control.
Thanks!
|
|