Leaflet.draw
Leaflet.draw copied to clipboard
Edit polygon does not take care of allowIntersection
trafficstars
When drawing a polygon, the option allowIntersection appears to work correctly. But thereafter when I edit the polygon the option allowIntersection does not work as expected, I mean on edit polygon I am able to intersect the lines which is not correct and expected as long as I set in draw to explicit not allow this !
same here
You have to set in the options.
let options = {
edit: {
poly: {
allowIntersection: false
}
}
}
I set it in Edit.Poly.js I modified a little bit to use drawError here
L.EditToolbar = L.Toolbar.extend({
statics: {
TYPE: "edit"
},
options: {
edit: {
selectedPathOptions: {
}
},
remove: {},
poly: {
allowIntersection: false,
drawError: {
}
},
featureGroup: null
},
....
})