Handle setActive(false) on an interaction without map

This commit is contained in:
Frederic Junod
2017-06-14 16:49:41 +02:00
parent c46bc1f02a
commit 3e7aecd094
2 changed files with 18 additions and 6 deletions

View File

@@ -143,6 +143,19 @@ describe('ol.interaction.Translate', function() {
});
describe('setActive', function() {
it('works when the map is not set', function() {
var translate = new ol.interaction.Translate({
features: features
});
expect(translate.getActive()).to.be(true);
translate.setActive(false);
expect(translate.getActive()).to.be(false);
});
});
describe('moving features, with features option', function() {
var translate;