Set the overview map target in ol.control.OverviewMap.setMap

This commit is contained in:
Frederic Junod
2017-01-18 11:49:51 +01:00
parent b23b6984d0
commit 21593503c6
2 changed files with 21 additions and 4 deletions

View File

@@ -87,6 +87,18 @@ describe('ol.control.OverviewMap', function() {
expect(ovView.getRotation()).to.be(Math.PI / 8);
});
it('set target to null', function() {
var control = new ol.control.OverviewMap();
map.addControl(control);
expect(control.ovmap_.getTarget()).not.to.be(null);
map.removeControl(control);
expect(control.ovmap_.getTarget()).to.be(null);
});
});
});