Reduce circle segments count (#349)

This commit is contained in:
Gautier P 2020-12-02 21:01:33 +01:00
parent 5995e2e879
commit fde629fcb0

View file

@ -88,6 +88,7 @@ BR.CircleGoArea = L.Control.extend({
if (center) {
var polygon = this.circleToPolygon(center, this.options.radius);
$('#nogoJSON').val(JSON.stringify(polygon));
$('#nogoBuffer').val(0);
this.nogos.uploadNogos();
} else {
this.nogos.clear();
@ -164,7 +165,7 @@ BR.CircleGoArea = L.Control.extend({
},
circleToPolygon: function(center, radius, numberOfSegments) {
var n = numberOfSegments ? numberOfSegments : 64;
var n = numberOfSegments ? numberOfSegments : 32;
var inner = [];
for (var i = 0; i < n; ++i) {