View Single Post
Old 12-31-2012, 08:45 PM   PM User | #5
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
If, as stated, this is a click and drag map them presumably the target-tile will be the same for both mouseup and mousedown.

You might consider my earlier suggestion:

Code:
var justClick = false;

someElement.onmousedown = function () {
    justClick = true;
}
someElement.onmousemove = function () {
    justClick = false;
}
someElement.onmouseup = function () {
    if (justClick) {
        // show menu..
        return;
    }
}
Although it's hard to be certain without further information.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote