Rename ol.interaction.ExtentEvent to ol.interaction.Extent.Event
This commit is contained in:
@@ -17,6 +17,7 @@ A number of internal types have been renamed. This will not affect those who us
|
|||||||
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
|
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
|
||||||
* rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property`
|
* rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property`
|
||||||
* rename `ol.format.IGCZ` to `ol.format.IGC.Z`
|
* rename `ol.format.IGCZ` to `ol.format.IGC.Z`
|
||||||
|
* rename `ol.interaction.ExtentEvent` to `ol.interaction.Extent.Event`
|
||||||
* rename `ol.interaction.DragAndDropEvent` to `ol.interaction.DragAndDrop.Event`
|
* rename `ol.interaction.DragAndDropEvent` to `ol.interaction.DragAndDrop.Event`
|
||||||
* rename `ol.interaction.DragAndDropEventType` to `ol.interaction.DragAndDrop.EventType`
|
* rename `ol.interaction.DragAndDropEventType` to `ol.interaction.DragAndDrop.EventType`
|
||||||
* rename `ol.interaction.TranslateEvent` to `ol.interaction.Translate.Event`
|
* rename `ol.interaction.TranslateEvent` to `ol.interaction.Translate.Event`
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
goog.provide('ol.interaction.Extent');
|
goog.provide('ol.interaction.Extent');
|
||||||
goog.provide('ol.interaction.ExtentEvent');
|
|
||||||
goog.provide('ol.interaction.ExtentEventType');
|
goog.provide('ol.interaction.ExtentEventType');
|
||||||
|
|
||||||
goog.require('ol');
|
goog.require('ol');
|
||||||
@@ -24,33 +23,12 @@ goog.require('ol.style.Style');
|
|||||||
ol.interaction.ExtentEventType = {
|
ol.interaction.ExtentEventType = {
|
||||||
/**
|
/**
|
||||||
* Triggered after the extent is changed
|
* Triggered after the extent is changed
|
||||||
* @event ol.interaction.ExtentEvent
|
* @event ol.interaction.Extent.Event
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
EXTENTCHANGED: 'extentchanged'
|
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
|
* @classdesc
|
||||||
@@ -60,7 +38,7 @@ ol.inherits(ol.interaction.ExtentEvent, ol.events.Event);
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Pointer}
|
* @extends {ol.interaction.Pointer}
|
||||||
* @fires ol.interaction.ExtentEvent
|
* @fires ol.interaction.Extent.Event
|
||||||
* @param {olx.interaction.ExtentOptions=} opt_options Options.
|
* @param {olx.interaction.ExtentOptions=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -473,5 +451,27 @@ ol.interaction.Extent.prototype.setExtent = function(extent) {
|
|||||||
//Null extent means no bbox
|
//Null extent means no bbox
|
||||||
this.extent_ = extent ? extent : null;
|
this.extent_ = extent ? extent : null;
|
||||||
this.createOrUpdateExtentFeature_(extent);
|
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