Rename and move some interaction enums
This commit is contained in:
@@ -15,6 +15,7 @@ goog.require('ol.events.condition');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.geom.Point');
|
||||
goog.require('ol.interaction.ModifyEventType');
|
||||
goog.require('ol.interaction.Pointer');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.source.Vector');
|
||||
@@ -214,7 +215,7 @@ ol.interaction.Modify.prototype.willModifyFeatures_ = function(evt) {
|
||||
if (!this.modified_) {
|
||||
this.modified_ = true;
|
||||
this.dispatchEvent(new ol.interaction.Modify.Event(
|
||||
ol.interaction.Modify.EventType_.MODIFYSTART, this.features_, evt));
|
||||
ol.interaction.ModifyEventType.MODIFYSTART, this.features_, evt));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -633,7 +634,7 @@ ol.interaction.Modify.handleUpEvent_ = function(evt) {
|
||||
}
|
||||
if (this.modified_) {
|
||||
this.dispatchEvent(new ol.interaction.Modify.Event(
|
||||
ol.interaction.Modify.EventType_.MODIFYEND, this.features_, evt));
|
||||
ol.interaction.ModifyEventType.MODIFYEND, this.features_, evt));
|
||||
this.modified_ = false;
|
||||
}
|
||||
return false;
|
||||
@@ -828,7 +829,7 @@ ol.interaction.Modify.prototype.removePoint = function() {
|
||||
this.willModifyFeatures_(evt);
|
||||
this.removeVertex_();
|
||||
this.dispatchEvent(new ol.interaction.Modify.Event(
|
||||
ol.interaction.Modify.EventType_.MODIFYEND, this.features_, evt));
|
||||
ol.interaction.ModifyEventType.MODIFYEND, this.features_, evt));
|
||||
this.modified_ = false;
|
||||
return true;
|
||||
}
|
||||
@@ -1004,7 +1005,7 @@ ol.interaction.Modify.getDefaultStyleFunction = function() {
|
||||
* @constructor
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.ModifyEvent}
|
||||
* @param {ol.interaction.Modify.EventType_} type Type.
|
||||
* @param {ol.interaction.ModifyEventType} type Type.
|
||||
* @param {ol.Collection.<ol.Feature>} features The features modified.
|
||||
* @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
|
||||
* {@link ol.MapBrowserPointerEvent}.
|
||||
@@ -1028,23 +1029,3 @@ ol.interaction.Modify.Event = function(type, features, mapBrowserPointerEvent) {
|
||||
this.mapBrowserEvent = mapBrowserPointerEvent;
|
||||
};
|
||||
ol.inherits(ol.interaction.Modify.Event, ol.events.Event);
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.Modify.EventType_ = {
|
||||
/**
|
||||
* Triggered upon feature modification start
|
||||
* @event ol.interaction.Modify.Event#modifystart
|
||||
* @api
|
||||
*/
|
||||
MODIFYSTART: 'modifystart',
|
||||
/**
|
||||
* Triggered upon feature modification end
|
||||
* @event ol.interaction.Modify.Event#modifyend
|
||||
* @api
|
||||
*/
|
||||
MODIFYEND: 'modifyend'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user