From 3ecc6d60d2097700f6fa2a249eb94af20c589214 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 16 Nov 2018 12:47:14 +0100 Subject: [PATCH] The forEachLayerAtPixel method calls getDataAtPixel for each layer renderer --- test/spec/ol/map.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/spec/ol/map.test.js b/test/spec/ol/map.test.js index 7a228cc906..8d145682b7 100644 --- a/test/spec/ol/map.test.js +++ b/test/spec/ol/map.test.js @@ -325,9 +325,9 @@ describe('ol.Map', function() { beforeEach(function(done) { log = []; - original = TileLayerRenderer.prototype.forEachLayerAtCoordinate; - TileLayerRenderer.prototype.forEachLayerAtCoordinate = function(coordinate) { - log.push(coordinate.slice()); + original = TileLayerRenderer.prototype.getDataAtPixel; + TileLayerRenderer.prototype.getDataAtPixel = function(pixel) { + log.push(pixel.slice()); }; target = document.createElement('div'); @@ -364,13 +364,13 @@ describe('ol.Map', function() { }); afterEach(function() { - TileLayerRenderer.prototype.forEachLayerAtCoordinate = original; + TileLayerRenderer.prototype.getDataAtPixel = original; map.dispose(); document.body.removeChild(target); log = null; }); - it('calls each layer renderer with the same coordinate', function() { + it('calls each layer renderer with the same pixel', function() { const pixel = [10, 20]; map.forEachLayerAtPixel(pixel, function() {}); expect(log.length).to.equal(3);