Rename ol.interaction.ExtentEvent to ol.interaction.Extent.Event
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
goog.provide('ol.interaction.Extent');
|
||||
goog.provide('ol.interaction.ExtentEvent');
|
||||
goog.provide('ol.interaction.ExtentEventType');
|
||||
|
||||
goog.require('ol');
|
||||
@@ -24,33 +23,12 @@ goog.require('ol.style.Style');
|
||||
ol.interaction.ExtentEventType = {
|
||||
/**
|
||||
* Triggered after the extent is changed
|
||||
* @event ol.interaction.ExtentEvent
|
||||
* @event ol.interaction.Extent.Event
|
||||
* @api
|
||||
*/
|
||||
EXTENTCHANGED: 'extentchanged'
|
||||
};
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.interaction.Extent} instances are instances of
|
||||
* this type.
|
||||
*
|
||||
* @constructor
|
||||
* @param {ol.Extent} extent the new extent
|
||||
* @extends {ol.events.Event}
|
||||
*/
|
||||
ol.interaction.ExtentEvent = function(extent) {
|
||||
ol.events.Event.call(this, ol.interaction.ExtentEventType.EXTENTCHANGED);
|
||||
|
||||
/**
|
||||
* The current extent.
|
||||
* @type {ol.Extent}
|
||||
* @api
|
||||
*/
|
||||
this.extent_ = extent;
|
||||
};
|
||||
|
||||
ol.inherits(ol.interaction.ExtentEvent, ol.events.Event);
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -60,7 +38,7 @@ ol.inherits(ol.interaction.ExtentEvent, ol.events.Event);
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.interaction.Pointer}
|
||||
* @fires ol.interaction.ExtentEvent
|
||||
* @fires ol.interaction.Extent.Event
|
||||
* @param {olx.interaction.ExtentOptions=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
@@ -473,5 +451,27 @@ ol.interaction.Extent.prototype.setExtent = function(extent) {
|
||||
//Null extent means no bbox
|
||||
this.extent_ = extent ? extent : null;
|
||||
this.createOrUpdateExtentFeature_(extent);
|
||||
this.dispatchEvent(new ol.interaction.ExtentEvent(this.extent_));
|
||||
this.dispatchEvent(new ol.interaction.Extent.Event(this.extent_));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.interaction.Extent} instances are instances of
|
||||
* this type.
|
||||
*
|
||||
* @constructor
|
||||
* @param {ol.Extent} extent the new extent
|
||||
* @extends {ol.events.Event}
|
||||
*/
|
||||
ol.interaction.Extent.Event = function(extent) {
|
||||
ol.events.Event.call(this, ol.interaction.ExtentEventType.EXTENTCHANGED);
|
||||
|
||||
/**
|
||||
* The current extent.
|
||||
* @type {ol.Extent}
|
||||
* @api
|
||||
*/
|
||||
this.extent_ = extent;
|
||||
};
|
||||
ol.inherits(ol.interaction.Extent.Event, ol.events.Event);
|
||||
|
||||
Reference in New Issue
Block a user