We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 346205f commit 7f3e92bCopy full SHA for 7f3e92b
src/js/Edit/L.PM.Edit.Line.js
@@ -473,8 +473,11 @@ Edit.Line = Edit.extend({
473
let markerArr =
474
indexPath.length > 1 ? get(this._markers, parentPath) : this._markers;
475
476
- // prevent removal of the layer if the vertex count is below minimum
477
- if (!this.options.removeLayerBelowMinVertexCount) {
+ // define whether marker is part of hole
+ const isHole = parentPath[parentPath.length - 1] > 0;
478
+
479
+ // prevent removal of the layer if the vertex count is below minimum when not a hole
480
+ if (!this.options.removeLayerBelowMinVertexCount && !isHole) {
481
// if on a line only 2 vertices left or on a polygon 3 vertices left, don't allow to delete
482
if (
483
coordsRing.length <= 2 ||
0 commit comments