add code comments to click and mousewheel handlers
This commit is contained in:
@@ -57,6 +57,7 @@ ol.handler.Click.prototype.disposeInternal = function() {
|
||||
* @param {goog.events.BrowserEvent} e
|
||||
*/
|
||||
ol.handler.Click.prototype.handleClick = function(e) {
|
||||
// do not emit a map click event after a drag
|
||||
if (!this.states_.dragged) {
|
||||
goog.events.dispatchEvent(this.map_, e);
|
||||
}
|
||||
|
||||
@@ -76,5 +76,6 @@ ol.handler.MouseWheel.prototype.defaultBehavior = function(e) {
|
||||
map.setZoom(map.getZoom() - step, e.position);
|
||||
|
||||
// We don't want the page to scroll.
|
||||
// (MouseWheelEvent is a BrowserEvent)
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user