| Issue 328: | Handling a double click event | |
| 1 person starred this issue and may be notified of changes. | Back to list |
In case it helps anyone, this is how I'm doing it:
I have a global variable called "_cal.clicked", which is set to "", "event", or "day."
The first time something is clicked, I set a timeout of 300ms to wait for a second click. If the
timeout expires before the second click, I don't do anything. Otherwise, I run the code as if it
were a dblclick event.
function eventClick(event, jsEvent, view) {
if(_cal.clicked != "event"){
//WAIT FOR ANOTHER "event" CLICK
_cal.clicked = "event";
setTimeout(function(){_cal.clicked = "";}, 300);
}
else{
//RESET THE FLAG
_cal.clicked = "";
//PRETEND IT'S A DOUBLE-CLICK
log("Faux event dblclick (8073311)");
}
}
Feb 6, 2010
Project Member
#1
adamrs...@gmail.com
Status:
Done
Feb 6, 2010
Excellent -- thanks, Adam. I think I even saw that thread before but couldn't find it again when searching for "dblclick". (The problem was that the search was set to "open issues" instead of "all issues"). Do you have a similar approach for handling a double click on an empty day? Michael
May 6, 2010
Michael, to answer your question (on behalf of the esteemed Mr. Shaw), Adam is working on a "dayRender" method - in case you didn't know about this fact yet. His "eventRender" code for the "dblclick" works great. |
|
| ► Sign in to add a comment |