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