From d1cf45f767d68fa27db57990373c8d6b11672ce8 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Wed, 11 Sep 2019 13:03:36 +0100 Subject: [PATCH] Update rotation tests to use rotatable controls #9919 make rotateWithView optional so controls used for rotation tests must be made rotatable --- test/spec/ol/control/overviewmap.test.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/spec/ol/control/overviewmap.test.js b/test/spec/ol/control/overviewmap.test.js index 60b6206863..7ffa8a0f4f 100644 --- a/test/spec/ol/control/overviewmap.test.js +++ b/test/spec/ol/control/overviewmap.test.js @@ -39,7 +39,9 @@ describe('ol.control.OverviewMap', function() { }); map.setView(view); - const control = new OverviewMap(); + const control = new OverviewMap({ + rotateWithView: true + }); map.addControl(control); const ovView = control.ovmap_.getView(); expect(ovView.getRotation()).to.be(0); @@ -49,7 +51,9 @@ describe('ol.control.OverviewMap', function() { }); it('maintains rotation in sync if view added later', function() { - const control = new OverviewMap(); + const control = new OverviewMap({ + rotateWithView: true + }); map.addControl(control); const ovView = control.ovmap_.getView(); expect(ovView.getRotation()).to.be(0); @@ -65,7 +69,9 @@ describe('ol.control.OverviewMap', function() { }); it('stops listening to old maps', function() { - const control = new OverviewMap(); + const control = new OverviewMap({ + rotateWithView: true + }); const ovView = control.ovmap_.getView(); const view = new View({