adb-shared 6.2.15 → 6.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/adb-shared.mjs
CHANGED
|
@@ -2984,14 +2984,15 @@ class PolygonDrawerInput {
|
|
|
2984
2984
|
snapMiddle: false
|
|
2985
2985
|
});
|
|
2986
2986
|
this.map.on("pm:create", (e) => {
|
|
2987
|
-
if (e.shape !== "Polygon")
|
|
2987
|
+
if (e.shape !== "Polygon" && e.shape !== "Circle")
|
|
2988
2988
|
return;
|
|
2989
2989
|
this.polygonDraw = false;
|
|
2990
2990
|
this.map.pm.disableDraw();
|
|
2991
2991
|
this.clearShape();
|
|
2992
|
-
this.shapeLayer =
|
|
2993
|
-
|
|
2994
|
-
|
|
2992
|
+
this.shapeLayer = e.shape === 'Polygon' ?
|
|
2993
|
+
Leaflet__default.geoJson(e.layer.toGeoJSON(), { style: { fillOpacity: 0.5 } }) :
|
|
2994
|
+
new Leaflet__default.FeatureGroup([new Leaflet__default.Circle(e.layer.getLatLng(), { radius: e.layer.getRadius() })]);
|
|
2995
|
+
this.shapeLayer.interactive = false;
|
|
2995
2996
|
this.map.addLayer(this.shapeLayer);
|
|
2996
2997
|
this.map.fitBounds(this.shapeLayer.getBounds());
|
|
2997
2998
|
this.onChange(e.layer.toGeoJSON());
|
|
@@ -3023,6 +3024,13 @@ class PolygonDrawerInput {
|
|
|
3023
3024
|
snappable: false
|
|
3024
3025
|
});
|
|
3025
3026
|
}
|
|
3027
|
+
onDrawCircle() {
|
|
3028
|
+
this.polygonDraw = true;
|
|
3029
|
+
this.map.pm.enableDraw("Circle", {
|
|
3030
|
+
allowSelfIntersection: false,
|
|
3031
|
+
snappable: false
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3026
3034
|
onUndoStep() {
|
|
3027
3035
|
const draw = this.map.pm.Draw?.Polygon;
|
|
3028
3036
|
draw?._removeLastVertex();
|
|
@@ -3051,7 +3059,7 @@ class PolygonDrawerInput {
|
|
|
3051
3059
|
useExisting: forwardRef((() => PolygonDrawerInput)),
|
|
3052
3060
|
multi: true
|
|
3053
3061
|
}
|
|
3054
|
-
], ngImport: i0, template: "<div class=\"mb-1 d-flex gap-1 flex-wrap align-items-start\">\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDrawPolygon()\" title=\"Polygon\">\r\n <span class=\"fas fa-draw-polygon\"></span> {{'OBSERVATION.DRAW'|translate}}\r\n </button>\r\n @if (polygonDraw) {\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDeleteShape()\" title=\"Ta bort\">\r\n <span class=\"fas fa-times\"></span>\r\n </button>\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onUndoStep()\" title=\"\u00C5ngra\">\r\n <span class=\"fas fa-undo\"></span>\r\n </button>\r\n }\r\n</div>\r\n<div [id]=\"mapId\" class=\"border\" style=\"height:20rem\"></div>", dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
3062
|
+
], ngImport: i0, template: "<div class=\"mb-1 d-flex gap-1 flex-wrap align-items-start\">\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDrawPolygon()\" title=\"Polygon\">\r\n <span class=\"fas fa-draw-polygon\"></span> {{'OBSERVATION.DRAW'|translate}}\r\n </button>\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDrawCircle()\" title=\"Circle\">\r\n <span class=\"fas fa-draw-circle\"></span> {{'OBSERVATION.DRAW_CIRCLE'|translate}}\r\n </button>\r\n @if (polygonDraw) {\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDeleteShape()\" title=\"Ta bort\">\r\n <span class=\"fas fa-times\"></span>\r\n </button>\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onUndoStep()\" title=\"\u00C5ngra\">\r\n <span class=\"fas fa-undo\"></span>\r\n </button>\r\n }\r\n</div>\r\n<div [id]=\"mapId\" class=\"border\" style=\"height:20rem\"></div>", dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
3055
3063
|
}
|
|
3056
3064
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PolygonDrawerInput, decorators: [{
|
|
3057
3065
|
type: Component,
|
|
@@ -3061,7 +3069,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
3061
3069
|
useExisting: forwardRef((() => PolygonDrawerInput)),
|
|
3062
3070
|
multi: true
|
|
3063
3071
|
}
|
|
3064
|
-
], template: "<div class=\"mb-1 d-flex gap-1 flex-wrap align-items-start\">\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDrawPolygon()\" title=\"Polygon\">\r\n <span class=\"fas fa-draw-polygon\"></span> {{'OBSERVATION.DRAW'|translate}}\r\n </button>\r\n @if (polygonDraw) {\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDeleteShape()\" title=\"Ta bort\">\r\n <span class=\"fas fa-times\"></span>\r\n </button>\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onUndoStep()\" title=\"\u00C5ngra\">\r\n <span class=\"fas fa-undo\"></span>\r\n </button>\r\n }\r\n</div>\r\n<div [id]=\"mapId\" class=\"border\" style=\"height:20rem\"></div>" }]
|
|
3072
|
+
], template: "<div class=\"mb-1 d-flex gap-1 flex-wrap align-items-start\">\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDrawPolygon()\" title=\"Polygon\">\r\n <span class=\"fas fa-draw-polygon\"></span> {{'OBSERVATION.DRAW'|translate}}\r\n </button>\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDrawCircle()\" title=\"Circle\">\r\n <span class=\"fas fa-draw-circle\"></span> {{'OBSERVATION.DRAW_CIRCLE'|translate}}\r\n </button>\r\n @if (polygonDraw) {\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onDeleteShape()\" title=\"Ta bort\">\r\n <span class=\"fas fa-times\"></span>\r\n </button>\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onUndoStep()\" title=\"\u00C5ngra\">\r\n <span class=\"fas fa-undo\"></span>\r\n </button>\r\n }\r\n</div>\r\n<div [id]=\"mapId\" class=\"border\" style=\"height:20rem\"></div>" }]
|
|
3065
3073
|
}] });
|
|
3066
3074
|
|
|
3067
3075
|
var AdbMapFilterType;
|
|
@@ -3380,7 +3388,7 @@ class AdbMapFilters {
|
|
|
3380
3388
|
this.filters = config.filters;
|
|
3381
3389
|
}
|
|
3382
3390
|
ngOnInit() {
|
|
3383
|
-
const lists$ = this.http.get(this.config.taxaListsApi
|
|
3391
|
+
const lists$ = this.http.get(this.config.taxaListsApi);
|
|
3384
3392
|
const combined$ = combineLatest([this.activatedRoute.paramMap, this.activatedRoute.queryParamMap, lists$])
|
|
3385
3393
|
.pipe(map$1(results => ({ params: results[0], qParams: results[1], lists: results[2] })), debounceTime$1(0));
|
|
3386
3394
|
this.subscriptions.add(combined$.subscribe(result => {
|