rm spurious check, fixes #4068

This commit is contained in:
Iván Sánchez Ortega 2016-04-02 18:32:31 +02:00 committed by Yohan Boniface
parent f1ce036caf
commit 4b38a7165a
2 changed files with 12 additions and 3 deletions

View File

@ -30,6 +30,17 @@ describe('GridLayer', function () {
var grid = L.gridLayer().addTo(map);
expect(grid.setOpacity(0.5)).to.equal(grid);
});
it('works when map has fadeAnimated=false (IE8 is exempt)', function (done) {
map.remove();
map = L.map(div, {fadeAnimation: false}).setView([0, 0], 0);
var grid = L.gridLayer().setOpacity(0.5).addTo(map);
grid.on('load', function () {
expect(grid._container.style.opacity).to.equal('0.5');
done();
});
});
});
it('positions tiles correctly with wrapping and bounding', function () {

View File

@ -273,9 +273,7 @@ L.GridLayer = L.Layer.extend({
if (!this._map) { return; }
// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles
if (L.Browser.ielt9 || !this._map._fadeAnimated) {
return;
}
if (L.Browser.ielt9) { return; }
L.DomUtil.setOpacity(this._container, this.options.opacity);