editor: add holes to new polygons
This commit is contained in:
parent
1664458dd9
commit
52958ec5fc
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue