From 52958ec5fcb9f64325abbf0e3a6bab29e0824472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Mon, 12 Dec 2016 12:51:48 +0100 Subject: [PATCH] editor: add holes to new polygons --- src/c3nav/editor/static/editor/js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 3902f287..6e680dfb 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -462,7 +462,7 @@ editor = { _click_editing_layer: function(e) { // click callback for a currently edited layer. create a hole on ctrl+click. if ((e.originalEvent.ctrlKey || e.originalEvent.metaKey)) { - if (e.target.feature.geometry.type == 'Polygon') { + if (e.target instanceof L.Polygon) { this.editor.newHole(e.latlng); } }