Remove use of goog.array.filter

This commit is contained in:
Frederic Junod
2015-09-24 09:57:20 +02:00
parent 9e2a393426
commit f49e82ade1
2 changed files with 2 additions and 4 deletions

View File

@@ -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;

View File

@@ -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');