Make interactions event targets
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
goog.provide('ol.interaction.Interaction');
|
goog.provide('ol.interaction.Interaction');
|
||||||
|
|
||||||
|
goog.require('goog.events.EventTarget');
|
||||||
goog.require('ol.MapBrowserEvent');
|
goog.require('ol.MapBrowserEvent');
|
||||||
goog.require('ol.animation');
|
goog.require('ol.animation');
|
||||||
goog.require('ol.easing');
|
goog.require('ol.easing');
|
||||||
@@ -10,8 +11,10 @@ goog.require('ol.easing');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
* @extends {goog.events.EventTarget}
|
||||||
*/
|
*/
|
||||||
ol.interaction.Interaction = function() {
|
ol.interaction.Interaction = function() {
|
||||||
|
goog.base(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -20,6 +23,7 @@ ol.interaction.Interaction = function() {
|
|||||||
this.map_ = null;
|
this.map_ = null;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
goog.inherits(ol.interaction.Interaction, goog.events.EventTarget);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ describe('ol.interaction.Interaction', function() {
|
|||||||
it('creates a new interaction', function() {
|
it('creates a new interaction', function() {
|
||||||
var interaction = new ol.interaction.Interaction();
|
var interaction = new ol.interaction.Interaction();
|
||||||
expect(interaction).to.be.a(ol.interaction.Interaction);
|
expect(interaction).to.be.a(ol.interaction.Interaction);
|
||||||
|
expect(interaction).to.be.a(goog.events.EventTarget);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -46,5 +47,6 @@ describe('ol.interaction.Interaction', function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
goog.require('goog.events.EventTarget');
|
||||||
goog.require('ol.Map');
|
goog.require('ol.Map');
|
||||||
goog.require('ol.interaction.Interaction');
|
goog.require('ol.interaction.Interaction');
|
||||||
|
|||||||
Reference in New Issue
Block a user