Rename ol.interaction.SelectEventType to ol.interaction.Select.EventType
This commit is contained in:
@@ -25,6 +25,7 @@ A number of internal types have been renamed. This will not affect those who us
|
||||
* rename `ol.interaction.DragAndDropEvent` to `ol.interaction.DragAndDrop.Event`
|
||||
* rename `ol.interaction.DragAndDropEventType` to `ol.interaction.DragAndDrop.EventType`
|
||||
* rename `ol.interaction.SelectEvent` to `ol.interaction.Select.Event`
|
||||
* rename `ol.interaction.SelectEventType` to `ol.interaction.Select.EventType`
|
||||
* rename `ol.interaction.TranslateEvent` to `ol.interaction.Translate.Event`
|
||||
* rename `ol.interaction.TranslateEventType` to `ol.interaction.Translate.EventType`
|
||||
* rename `ol.layer.GroupProperty` to `ol.layer.Group.Property`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
goog.provide('ol.interaction.Select');
|
||||
goog.provide('ol.interaction.SelectEventType');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.asserts');
|
||||
@@ -18,19 +17,6 @@ goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
ol.interaction.SelectEventType = {
|
||||
/**
|
||||
* Triggered when feature(s) has been (de)selected.
|
||||
* @event ol.interaction.Select.Event#select
|
||||
* @api
|
||||
*/
|
||||
SELECT: 'select'
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Interaction for selecting vector features. By default, selected features are
|
||||
@@ -271,7 +257,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
|
||||
}
|
||||
if (selected.length > 0 || deselected.length > 0) {
|
||||
this.dispatchEvent(
|
||||
new ol.interaction.Select.Event(ol.interaction.SelectEventType.SELECT,
|
||||
new ol.interaction.Select.Event(ol.interaction.Select.EventType.SELECT,
|
||||
selected, deselected, mapBrowserEvent));
|
||||
}
|
||||
return ol.events.condition.pointerMove(mapBrowserEvent);
|
||||
@@ -354,7 +340,7 @@ ol.interaction.Select.prototype.removeFeatureLayerAssociation_ = function(featur
|
||||
* Events emitted by {@link ol.interaction.Select} instances are instances of
|
||||
* this type.
|
||||
*
|
||||
* @param {string} type The event type.
|
||||
* @param {ol.interaction.Select.EventType} type The event type.
|
||||
* @param {Array.<ol.Feature>} selected Selected features.
|
||||
* @param {Array.<ol.Feature>} deselected Deselected features.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Associated
|
||||
@@ -388,3 +374,16 @@ ol.interaction.Select.Event = function(type, selected, deselected, mapBrowserEve
|
||||
this.mapBrowserEvent = mapBrowserEvent;
|
||||
};
|
||||
ol.inherits(ol.interaction.Select.Event, ol.events.Event);
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
ol.interaction.Select.EventType = {
|
||||
/**
|
||||
* Triggered when feature(s) has been (de)selected.
|
||||
* @event ol.interaction.Select.Event#select
|
||||
* @api
|
||||
*/
|
||||
SELECT: 'select'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user