add comment as to why clearTimer is needed here, and change control flow back to what it was before breakage, i.e. do not call clearTimer if it does not pass the tolerance

This commit is contained in:
Bart van den Eijnden
2012-03-12 09:59:25 +01:00
parent f28c432b34
commit 1dba227db4

View File

@@ -331,10 +331,13 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* Handle double-click sequence. * Handle double-click sequence.
*/ */
handleDouble: function(evt) { handleDouble: function(evt) {
if (this["double"] && this.passesDblclickTolerance(evt)) { if (this.passesDblclickTolerance(evt)) {
if (this["double"]) {
this.callback("dblclick", [evt]); this.callback("dblclick", [evt]);
} }
// to prevent a dblclick from firing the click callback in IE
this.clearTimer(); this.clearTimer();
}
}, },
/** /**