Merge pull request #12028 from MoonE/overview-map-no-initial-target

Overview map no initial target
This commit is contained in:
MoonE
2021-04-03 23:15:30 +02:00
committed by GitHub
4 changed files with 49 additions and 20 deletions

View File

@@ -687,6 +687,7 @@ describe('ol.Map', function () {
});
describe('#setTarget', function () {
/** @type {Map|undefined} */
let map;
beforeEach(function () {
@@ -696,6 +697,12 @@ describe('ol.Map', function () {
expect(map.handleResize_).to.be.ok();
});
describe('map with target not attached to dom', function () {
it('has undefined as size with target not in document', function () {
expect(map.getSize()).to.be(undefined);
});
});
describe('call setTarget with null', function () {
it('unregisters the viewport resize listener', function () {
map.setTarget(null);