Do not recenter map and zoom on repeated clicks on +/-

Multiple fast clicks get interpreted as DBLCLICK by the browser,
so it makes sense to stop propagation of DBLCLICK events when
they happen on elements on the overlay container. This is also
a good change because DBLCLICK might have a meaning on other map
overlays as well.
This commit is contained in:
ahocevar
2013-03-18 09:19:10 +01:00
parent 40f2dc6322
commit f765982654

View File

@@ -197,6 +197,7 @@ ol.Map = function(mapOptions) {
'ol-overlaycontainer');
goog.events.listen(this.overlayContainer_, [
goog.events.EventType.CLICK,
goog.events.EventType.DBLCLICK,
ol.BrowserFeature.HAS_TOUCH ?
goog.events.EventType.TOUCHSTART : goog.events.EventType.MOUSEDOWN
], goog.events.Event.stopPropagation);