From 49b210973e94fc6551ab6825ff07d6c7af346f5d Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 4 Feb 2016 14:19:17 +0100 Subject: [PATCH 1/2] Use ol.array instead of goog.array --- test/spec/ol/format/kmlformat.test.js | 4 ++-- test/spec/ol/layer/layergroup.test.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/spec/ol/format/kmlformat.test.js b/test/spec/ol/format/kmlformat.test.js index 21ea9fe12b..f7f063b7fa 100644 --- a/test/spec/ol/format/kmlformat.test.js +++ b/test/spec/ol/format/kmlformat.test.js @@ -2658,7 +2658,7 @@ describe('ol.format.KML', function() { }); it('creates a Point and a MultiPolygon for Alaska', function() { - var alaska = goog.array.find(features, function(feature) { + var alaska = ol.array.find(features, function(feature) { return feature.get('name') === 'Alaska'; }); expect(alaska).to.be.an(ol.Feature); @@ -2798,7 +2798,7 @@ describe('ol.format.KML', function() { }); -goog.require('goog.array'); +goog.require('ol.array'); goog.require('goog.dom.xml'); goog.require('ol.Feature'); goog.require('ol.format.GeoJSON'); diff --git a/test/spec/ol/layer/layergroup.test.js b/test/spec/ol/layer/layergroup.test.js index be86aed6a5..8d357b76d4 100644 --- a/test/spec/ol/layer/layergroup.test.js +++ b/test/spec/ol/layer/layergroup.test.js @@ -443,7 +443,7 @@ describe('ol.layer.Group', function() { var layerStatesArray = layerGroup.getLayerStatesArray(); var initialArray = layerStatesArray.slice(); - goog.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex); + ol.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex); expect(layerStatesArray[0]).to.eql(initialArray[0]); expect(layerStatesArray[1]).to.eql(initialArray[1]); @@ -471,7 +471,7 @@ describe('ol.layer.Group', function() { var layerStatesArray = layerGroup.getLayerStatesArray(); var initialArray = layerStatesArray.slice(); - goog.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex); + ol.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex); expect(layerStatesArray[0]).to.eql(initialArray[3]); expect(layerStatesArray[1]).to.eql(initialArray[0]); expect(layerStatesArray[2]).to.eql(initialArray[2]); @@ -489,7 +489,7 @@ describe('ol.layer.Group', function() { }); -goog.require('goog.array'); +goog.require('ol.array'); goog.require('goog.dispose'); goog.require('ol.events'); goog.require('ol.events.EventType'); From a2171124e13c27d32373f5088a743772c3212c22 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 4 Feb 2016 14:24:00 +0100 Subject: [PATCH 2/2] Remove unneeded goog.array.ASSUME_NATIVE_FUNCTIONS define --- config/example.json | 1 - config/examples-all.json | 1 - config/ol.json | 1 - doc/tutorials/closure.md | 2 -- doc/tutorials/custom-builds.md | 1 - 5 files changed, 6 deletions(-) diff --git a/config/example.json b/config/example.json index 0489a00db9..cea012bc99 100644 --- a/config/example.json +++ b/config/example.json @@ -24,7 +24,6 @@ "externs/topojson.js" ], "define": [ - "goog.array.ASSUME_NATIVE_FUNCTIONS=true", "goog.dom.ASSUME_STANDARDS_MODE=true", "goog.json.USE_NATIVE_JSON=true", "goog.DEBUG=false" diff --git a/config/examples-all.json b/config/examples-all.json index 1b5d45e16f..f7ced6c806 100644 --- a/config/examples-all.json +++ b/config/examples-all.json @@ -25,7 +25,6 @@ "externs/topojson.js" ], "define": [ - "goog.array.ASSUME_NATIVE_FUNCTIONS=true", "goog.dom.ASSUME_STANDARDS_MODE=true", "goog.json.USE_NATIVE_JSON=true", "goog.DEBUG=false" diff --git a/config/ol.json b/config/ol.json index f0970cdb16..3b6dbc1af0 100644 --- a/config/ol.json +++ b/config/ol.json @@ -14,7 +14,6 @@ "externs/topojson.js" ], "define": [ - "goog.array.ASSUME_NATIVE_FUNCTIONS=true", "goog.dom.ASSUME_STANDARDS_MODE=true", "goog.json.USE_NATIVE_JSON=true", "goog.DEBUG=false" diff --git a/doc/tutorials/closure.md b/doc/tutorials/closure.md index 395f9eeb65..a964a5a2c2 100644 --- a/doc/tutorials/closure.md +++ b/doc/tutorials/closure.md @@ -167,7 +167,6 @@ The minimum config file looks like this: "node_modules/openlayers/externs/topojson.js" ], "define": [ - "goog.array.ASSUME_NATIVE_FUNCTIONS=true", "goog.dom.ASSUME_STANDARDS_MODE=true", "goog.json.USE_NATIVE_JSON=true", "goog.DEBUG=false", @@ -223,7 +222,6 @@ Here is a version of `config.json` with more compilation checks enabled: "node_modules/openlayers/externs/topojson.js" ], "define": [ - "goog.array.ASSUME_NATIVE_FUNCTIONS=true", "goog.dom.ASSUME_STANDARDS_MODE=true", "goog.json.USE_NATIVE_JSON=true", "goog.DEBUG=false", diff --git a/doc/tutorials/custom-builds.md b/doc/tutorials/custom-builds.md index 46a7472fd1..337b38d748 100644 --- a/doc/tutorials/custom-builds.md +++ b/doc/tutorials/custom-builds.md @@ -60,7 +60,6 @@ Creating a custom build requires writing a build configuration file. The format "externs/topojson.js" ], "define": [ - "goog.array.ASSUME_NATIVE_FUNCTIONS=true", "goog.dom.ASSUME_STANDARDS_MODE=true", "goog.json.USE_NATIVE_JSON=true", "goog.DEBUG=false"