Improve Draw type to mode conversion

Throw error if Draw is configured with an invalid type.
This commit is contained in:
Maximilian Krög
2020-12-19 17:58:56 +01:00
parent 3cab5f3099
commit 288fd0b74c
2 changed files with 15 additions and 17 deletions

View File

@@ -1381,7 +1381,7 @@ describe('ol.interaction.Draw', function () {
describe('#getOverlay', function () {
it('returns the feature overlay layer', function () {
const draw = new Draw({});
const draw = new Draw({type: 'Point'});
expect(draw.getOverlay()).to.eql(draw.overlay_);
});
});