From ab06b8a8d12951da4a6de0bb3488457614325568 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Wed, 20 Feb 2019 10:06:31 +0100 Subject: [PATCH] Fix an error when creating a nogo circle --- js/plugin/NogoAreas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/plugin/NogoAreas.js b/js/plugin/NogoAreas.js index 3816b7c..15853e8 100644 --- a/js/plugin/NogoAreas.js +++ b/js/plugin/NogoAreas.js @@ -114,7 +114,9 @@ BR.NogoAreas = L.Control.extend({ getOptions: function() { return { - nogos: this.drawnItems.getLayers() + nogos: this.drawnItems.getLayers().filter(function (e) { return e instanceof L.Circle; }), + polygons: this.drawnItems.getLayers().filter(function (e) { return e instanceof L.Polygon; }), + polylines: this.drawnItems.getLayers().filter(function (e) { return e instanceof L.Polyline; }), }; },