Fix ol.interaction.Extent event type and documentation
This commit is contained in:
@@ -91,6 +91,17 @@ oli.DrawEvent = function() {};
|
|||||||
oli.DrawEvent.prototype.feature;
|
oli.DrawEvent.prototype.feature;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @interface
|
||||||
|
*/
|
||||||
|
oli.ExtentEvent = function() {};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {ol.Extent}
|
||||||
|
*/
|
||||||
|
oli.ExtentEvent.prototype.extent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @interface
|
* @interface
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ goog.require('ol.extent');
|
|||||||
goog.require('ol.geom.GeometryType');
|
goog.require('ol.geom.GeometryType');
|
||||||
goog.require('ol.geom.Point');
|
goog.require('ol.geom.Point');
|
||||||
goog.require('ol.geom.Polygon');
|
goog.require('ol.geom.Polygon');
|
||||||
|
goog.require('ol.interaction.ExtentEventType');
|
||||||
goog.require('ol.interaction.Pointer');
|
goog.require('ol.interaction.Pointer');
|
||||||
goog.require('ol.layer.Vector');
|
goog.require('ol.layer.Vector');
|
||||||
goog.require('ol.source.Vector');
|
goog.require('ol.source.Vector');
|
||||||
@@ -445,31 +446,19 @@ ol.interaction.Extent.prototype.setExtent = function(extent) {
|
|||||||
* this type.
|
* this type.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
|
* @implements {oli.ExtentEvent}
|
||||||
* @param {ol.Extent} extent the new extent
|
* @param {ol.Extent} extent the new extent
|
||||||
* @extends {ol.events.Event}
|
* @extends {ol.events.Event}
|
||||||
*/
|
*/
|
||||||
ol.interaction.Extent.Event = function(extent) {
|
ol.interaction.Extent.Event = function(extent) {
|
||||||
ol.events.Event.call(this, ol.interaction.Extent.EventType_.EXTENTCHANGED);
|
ol.events.Event.call(this, ol.interaction.ExtentEventType.EXTENTCHANGED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current extent.
|
* The current extent.
|
||||||
* @type {ol.Extent}
|
* @type {ol.Extent}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
this.extent_ = extent;
|
this.extent = extent;
|
||||||
|
|
||||||
};
|
};
|
||||||
ol.inherits(ol.interaction.Extent.Event, ol.events.Event);
|
ol.inherits(ol.interaction.Extent.Event, ol.events.Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @enum {string}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
ol.interaction.Extent.EventType_ = {
|
|
||||||
/**
|
|
||||||
* Triggered after the extent is changed
|
|
||||||
* @event ol.interaction.Extent.Event
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
EXTENTCHANGED: 'extentchanged'
|
|
||||||
};
|
|
||||||
|
|||||||
14
src/ol/interaction/extenteventtype.js
Normal file
14
src/ol/interaction/extenteventtype.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
goog.provide('ol.interaction.ExtentEventType');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
ol.interaction.ExtentEventType = {
|
||||||
|
/**
|
||||||
|
* Triggered after the extent is changed
|
||||||
|
* @event ol.interaction.Extent.Event#extentchanged
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
EXTENTCHANGED: 'extentchanged'
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user