From 6576a491783626424ee94b3aca406597a3b1d9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 19 Aug 2013 14:13:52 +0200 Subject: [PATCH] Make ol.Collection#extend return this This to be able to do this: new ol.Map({ controls: ol.control.defaults().extend([new MyControl()]), ... }) --- src/ol/collection.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/collection.js b/src/ol/collection.js index fb3fd57962..e73eb3376e 100644 --- a/src/ol/collection.js +++ b/src/ol/collection.js @@ -86,12 +86,14 @@ ol.Collection.prototype.clear = function() { /** * @param {Array} arr Array. + * @return {ol.Collection} This collection. */ ol.Collection.prototype.extend = function(arr) { var i, ii; for (i = 0, ii = arr.length; i < ii; ++i) { this.push(arr[i]); } + return this; };