单击鼠标选择一个日期范围进行缩放。双击取消日期选择在 ie 10 中不起作用,但在较少的浏览器中工作正常:
function mouseClickHandler(which) {
clickx = event.offsetX;
clicky = event.offsetY;
switch (which) {
case "click":
// If we've just had a doubleclick then ignore it
if (hadDoubleClick()) return false;
// Otherwise set timer to act. It may be preempted by a doubleclick.
savEvent = which;
d = new Date();
savEvtTime = d.getTime();
savTO = setTimeout("doClick(savEvent)", dcTime);
break;
case "dblclick":
doDoubleClick(which);
break;
default:
}
}