From f49e82ade1d5319a0dfc089674031eb2f60f70a8 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 24 Sep 2015 09:57:20 +0200 Subject: [PATCH] Remove use of goog.array.filter --- src/ol/source/clustersource.js | 3 +-- test/spec/ol/interaction/modifyinteraction.test.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ol/source/clustersource.js b/src/ol/source/clustersource.js index c2ba38a1d0..b05a791f76 100644 --- a/src/ol/source/clustersource.js +++ b/src/ol/source/clustersource.js @@ -3,7 +3,6 @@ goog.provide('ol.source.Cluster'); -goog.require('goog.array'); goog.require('goog.asserts'); goog.require('goog.events.EventType'); goog.require('goog.object'); @@ -128,7 +127,7 @@ ol.source.Cluster.prototype.cluster_ = function() { var neighbors = this.source_.getFeaturesInExtent(extent); goog.asserts.assert(neighbors.length >= 1, 'at least one neighbor found'); - neighbors = goog.array.filter(neighbors, function(neighbor) { + neighbors = neighbors.filter(function(neighbor) { var uid = goog.getUid(neighbor).toString(); if (!goog.object.containsKey(clustered, uid)) { clustered[uid] = true; diff --git a/test/spec/ol/interaction/modifyinteraction.test.js b/test/spec/ol/interaction/modifyinteraction.test.js index 52f5fd1627..5fcaf2fdf1 100644 --- a/test/spec/ol/interaction/modifyinteraction.test.js +++ b/test/spec/ol/interaction/modifyinteraction.test.js @@ -270,7 +270,7 @@ describe('ol.interaction.Modify', function() { getListeners = function(feature, modify) { var listeners = goog.events.getListeners( feature, goog.events.EventType.CHANGE, false); - return goog.array.filter(listeners, function(listener) { + return listeners.filter(function(listener) { return listener.handler == modify; }); }; @@ -317,7 +317,6 @@ describe('ol.interaction.Modify', function() { }); -goog.require('goog.array'); goog.require('goog.dispose'); goog.require('goog.events'); goog.require('goog.events.EventType');