Replace goog.events.Event/EventTarget system with our own
This also removes goog.events.listen, goog.events.unlisten, goog.events.unlistenByKey and goog.events.BrowserEvent.
This commit is contained in:
@@ -3,8 +3,8 @@ goog.provide('ol.control.OverviewMap');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.classlist');
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.EventType');
|
||||
goog.require('ol.events');
|
||||
goog.require('ol.events.EventType');
|
||||
goog.require('goog.math.Size');
|
||||
goog.require('goog.style');
|
||||
goog.require('ol');
|
||||
@@ -83,7 +83,7 @@ ol.control.OverviewMap = function(opt_options) {
|
||||
'title': tipLabel
|
||||
}, activeLabel);
|
||||
|
||||
goog.events.listen(button, goog.events.EventType.CLICK,
|
||||
ol.events.listen(button, ol.events.EventType.CLICK,
|
||||
this.handleClick_, false, this);
|
||||
|
||||
var ovmapDiv = goog.dom.createDom('DIV', 'ol-overviewmap-map');
|
||||
@@ -159,7 +159,7 @@ ol.control.OverviewMap.prototype.setMap = function(map) {
|
||||
goog.base(this, 'setMap', map);
|
||||
|
||||
if (map) {
|
||||
this.listenerKeys.push(goog.events.listen(
|
||||
this.listenerKeys.push(ol.events.listen(
|
||||
map, ol.ObjectEventType.PROPERTYCHANGE,
|
||||
this.handleMapPropertyChange_, false, this));
|
||||
|
||||
@@ -203,7 +203,7 @@ ol.control.OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
|
||||
* @private
|
||||
*/
|
||||
ol.control.OverviewMap.prototype.bindView_ = function(view) {
|
||||
goog.events.listen(view,
|
||||
ol.events.listen(view,
|
||||
ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
|
||||
this.handleRotationChanged_, false, this);
|
||||
};
|
||||
@@ -215,7 +215,7 @@ ol.control.OverviewMap.prototype.bindView_ = function(view) {
|
||||
* @private
|
||||
*/
|
||||
ol.control.OverviewMap.prototype.unbindView_ = function(view) {
|
||||
goog.events.unlisten(view,
|
||||
ol.events.unlisten(view,
|
||||
ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
|
||||
this.handleRotationChanged_, false, this);
|
||||
};
|
||||
@@ -432,7 +432,7 @@ ol.control.OverviewMap.prototype.calculateCoordinateRotate_ = function(
|
||||
|
||||
|
||||
/**
|
||||
* @param {goog.events.BrowserEvent} event The event to handle
|
||||
* @param {Event} event The event to handle
|
||||
* @private
|
||||
*/
|
||||
ol.control.OverviewMap.prototype.handleClick_ = function(event) {
|
||||
@@ -459,7 +459,7 @@ ol.control.OverviewMap.prototype.handleToggle_ = function() {
|
||||
if (!this.collapsed_ && !ovmap.isRendered()) {
|
||||
ovmap.updateSize();
|
||||
this.resetExtent_();
|
||||
goog.events.listenOnce(ovmap, ol.MapEventType.POSTRENDER,
|
||||
ol.events.listenOnce(ovmap, ol.MapEventType.POSTRENDER,
|
||||
function(event) {
|
||||
this.updateBox_();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user