Use ol.array.includes instead of goog.array.indexOf
This commit is contained in:
@@ -265,8 +265,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
|
|||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
*/
|
*/
|
||||||
function(feature, layer) {
|
function(feature, layer) {
|
||||||
var index = goog.array.indexOf(features.getArray(), feature);
|
if (!ol.array.includes(features.getArray(), feature)) {
|
||||||
if (index == -1) {
|
|
||||||
if (add || toggle) {
|
if (add || toggle) {
|
||||||
if (this.filter_(feature, layer)) {
|
if (this.filter_(feature, layer)) {
|
||||||
selected.push(feature);
|
selected.push(feature);
|
||||||
|
|||||||
Reference in New Issue
Block a user