Rename ol.ModifyEvent to ol.interaction.ModifyEvent
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
goog.provide('ol.ModifyEvent');
|
|
||||||
goog.provide('ol.interaction.Modify');
|
goog.provide('ol.interaction.Modify');
|
||||||
|
goog.provide('ol.interaction.ModifyEvent');
|
||||||
|
|
||||||
goog.require('goog.array');
|
goog.require('goog.array');
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
@@ -34,13 +34,13 @@ goog.require('ol.structs.RBush');
|
|||||||
ol.ModifyEventType = {
|
ol.ModifyEventType = {
|
||||||
/**
|
/**
|
||||||
* Triggered upon feature modification start
|
* Triggered upon feature modification start
|
||||||
* @event ol.ModifyEvent#modifystart
|
* @event ol.interaction.ModifyEvent#modifystart
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
MODIFYSTART: 'modifystart',
|
MODIFYSTART: 'modifystart',
|
||||||
/**
|
/**
|
||||||
* Triggered upon feature modification end
|
* Triggered upon feature modification end
|
||||||
* @event ol.ModifyEvent#modifyend
|
* @event ol.interaction.ModifyEvent#modifyend
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
MODIFYEND: 'modifyend'
|
MODIFYEND: 'modifyend'
|
||||||
@@ -61,7 +61,7 @@ ol.ModifyEventType = {
|
|||||||
* @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
|
* @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
|
||||||
* {@link ol.MapBrowserPointerEvent}.
|
* {@link ol.MapBrowserPointerEvent}.
|
||||||
*/
|
*/
|
||||||
ol.ModifyEvent = function(type, features, mapBrowserPointerEvent) {
|
ol.interaction.ModifyEvent = function(type, features, mapBrowserPointerEvent) {
|
||||||
|
|
||||||
goog.base(this, type);
|
goog.base(this, type);
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ ol.ModifyEvent = function(type, features, mapBrowserPointerEvent) {
|
|||||||
*/
|
*/
|
||||||
this.mapBrowserPointerEvent = mapBrowserPointerEvent;
|
this.mapBrowserPointerEvent = mapBrowserPointerEvent;
|
||||||
};
|
};
|
||||||
goog.inherits(ol.ModifyEvent, goog.events.Event);
|
goog.inherits(ol.interaction.ModifyEvent, goog.events.Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,7 +100,7 @@ ol.interaction.SegmentDataType;
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Pointer}
|
* @extends {ol.interaction.Pointer}
|
||||||
* @param {olx.interaction.ModifyOptions} options Options.
|
* @param {olx.interaction.ModifyOptions} options Options.
|
||||||
* @fires ol.ModifyEvent
|
* @fires ol.interaction.ModifyEvent
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify = function(options) {
|
ol.interaction.Modify = function(options) {
|
||||||
@@ -579,7 +579,8 @@ ol.interaction.Modify.handleDownEvent_ = function(evt) {
|
|||||||
for (i = insertVertices.length - 1; i >= 0; --i) {
|
for (i = insertVertices.length - 1; i >= 0; --i) {
|
||||||
this.insertVertex_.apply(this, insertVertices[i]);
|
this.insertVertex_.apply(this, insertVertices[i]);
|
||||||
}
|
}
|
||||||
this.dispatchEvent(new ol.ModifyEvent(ol.ModifyEventType.MODIFYSTART,
|
this.dispatchEvent(
|
||||||
|
new ol.interaction.ModifyEvent(ol.ModifyEventType.MODIFYSTART,
|
||||||
this.features_, evt));
|
this.features_, evt));
|
||||||
}
|
}
|
||||||
return !goog.isNull(this.vertexFeature_);
|
return !goog.isNull(this.vertexFeature_);
|
||||||
@@ -654,7 +655,8 @@ ol.interaction.Modify.handleUpEvent_ = function(evt) {
|
|||||||
this.rBush_.update(ol.extent.boundingExtent(segmentData.segment),
|
this.rBush_.update(ol.extent.boundingExtent(segmentData.segment),
|
||||||
segmentData);
|
segmentData);
|
||||||
}
|
}
|
||||||
this.dispatchEvent(new ol.ModifyEvent(ol.ModifyEventType.MODIFYEND,
|
this.dispatchEvent(
|
||||||
|
new ol.interaction.ModifyEvent(ol.ModifyEventType.MODIFYEND,
|
||||||
this.features_, evt));
|
this.features_, evt));
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user