add a click handler
This commit is contained in:
@@ -7,6 +7,7 @@ goog.require('ol.control.Control');
|
||||
goog.require('ol.renderer.MapRenderer');
|
||||
goog.require('ol.handler.Drag');
|
||||
goog.require('ol.handler.MouseWheel');
|
||||
goog.require('ol.handler.Click');
|
||||
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.math');
|
||||
@@ -23,6 +24,11 @@ ol.ENABLE_DRAG_HANDLER = true;
|
||||
*/
|
||||
ol.ENABLE_MOUSEWHEEL_HANDLER = true;
|
||||
|
||||
/**
|
||||
* @define {boolean} Whether to enable the click handler.
|
||||
*/
|
||||
ol.ENABLE_CLICK_HANDLER = true;
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @constructor
|
||||
@@ -529,6 +535,10 @@ ol.Map.prototype.initHandlers = function() {
|
||||
handler = new ol.handler.MouseWheel(this, this.viewport_, states);
|
||||
this.registerDisposable(handler);
|
||||
}
|
||||
if (ol.ENABLE_CLICK_HANDLER) {
|
||||
handler = new ol.handler.Click(this, this.viewport_, states);
|
||||
this.registerDisposable(handler);
|
||||
}
|
||||
};
|
||||
|
||||
ol.Map.prototype.createRenderer = function() {
|
||||
|
||||
Reference in New Issue
Block a user