Only clear canvas when necessary, add tests

This commit is contained in:
Tim Schaub
2017-09-24 10:58:01 -07:00
parent ecc2a9059e
commit 0f53d04361
6 changed files with 85 additions and 5 deletions

View File

@@ -72,6 +72,21 @@ describe('ol.rendering.layer.Tile', function() {
});
}
describe('with tile transition', function() {
it('renders correctly after the transition', function(done) {
createMap('canvas');
var source = new ol.source.XYZ({
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png'
});
waitForTiles([source], {}, function() {
setTimeout(function() {
expectResemble(map, 'rendering/ol/layer/expected/osm-canvas.png',
IMAGE_TOLERANCE, done);
}, 500);
});
});
});
describe('single tile layer', function() {
var source;