Satisfying linter, jsdoc & compiler

This commit is contained in:
simonseyock
2016-10-19 18:10:21 +02:00
committed by simonseyock
parent 2493eb2c20
commit 80e392ea52
7 changed files with 82 additions and 53 deletions

View File

@@ -111,11 +111,11 @@ describe('ol.renderer.canvas.Map', function() {
map.addLayer(layer);
map.renderSync();
var cb = sinon.spy();
map.forEachFeatureAtPixel(map.getPixelFromCoordinate([0, 0]), {
layerFilter: function() {
return false;
}
}, cb);
map.forEachFeatureAtPixel(map.getPixelFromCoordinate([0, 0]), cb, null, {
layerFilter: function() {
return false;
}
});
expect(cb).to.not.be.called();
});
@@ -151,13 +151,13 @@ describe('ol.renderer.canvas.Map', function() {
];
for (var i = 0; i < 4; i++) {
map.forEachFeatureAtPixel(pixelsInside[i], {hitTolerance:10}, cb1);
map.forEachFeatureAtPixel(pixelsInside[i], cb1, null, {hitTolerance:10});
}
expect(cb1.callCount).to.be(4);
expect(cb1.firstCall.args[1]).to.be(layer);
for (var j = 0; j < 4; j++) {
map.forEachFeatureAtPixel(pixelsOutside[j], {hitTolerance:10}, cb2);
map.forEachFeatureAtPixel(pixelsOutside[j], cb2, null, {hitTolerance:10});
}
expect(cb2).not.to.be.called();
});