Replace goog.array.contains with ol.array.includes
This commit is contained in:
@@ -10,6 +10,7 @@ goog.require('goog.events.Event');
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol.CollectionEventType');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.events.condition');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.interaction.Interaction');
|
||||
@@ -160,7 +161,7 @@ ol.interaction.Select = function(opt_options) {
|
||||
* @return {boolean} Include.
|
||||
*/
|
||||
function(layer) {
|
||||
return goog.array.contains(layers, layer);
|
||||
return ol.array.includes(layers, layer);
|
||||
};
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
goog.provide('ol.interaction.Translate');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.interaction.Pointer');
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ ol.interaction.Translate.handleMoveEvent_ = function(event)
|
||||
var isSelected = false;
|
||||
|
||||
if (!goog.isNull(this.features_) &&
|
||||
goog.array.contains(this.features_.getArray(), intersectingFeature)) {
|
||||
ol.array.includes(this.features_.getArray(), intersectingFeature)) {
|
||||
isSelected = true;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ ol.interaction.Translate.prototype.featuresAtPixel_ = function(pixel, map) {
|
||||
});
|
||||
|
||||
if (!goog.isNull(this.features_) &&
|
||||
goog.array.contains(this.features_.getArray(), intersectingFeature)) {
|
||||
ol.array.includes(this.features_.getArray(), intersectingFeature)) {
|
||||
found = intersectingFeature;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user