diff --git a/src/partials/editor.html b/src/partials/editor.html
index ac9e524..8cb9424 100644
--- a/src/partials/editor.html
+++ b/src/partials/editor.html
@@ -361,7 +361,10 @@
Appearance
-
+
+
+
+
diff --git a/src/worldmap.ts b/src/worldmap.ts
index 656979c..c81fc77 100644
--- a/src/worldmap.ts
+++ b/src/worldmap.ts
@@ -47,6 +47,8 @@ export default class WorldMap {
attributionControl: this.ctrl.settings.showAttribution,
});
this.setMouseWheelZoom();
+ this.setDragging();
+ this.setDoubleClickZoom();
const selectedTileServer = tileServers[this.ctrl.tileServer];
(window as any).L.tileLayer(selectedTileServer.url, {
@@ -445,6 +447,22 @@ export default class WorldMap {
}
}
+ setDragging() {
+ if (!this.ctrl.settings.dragging) {
+ this.map.dragging.disable();
+ } else {
+ this.map.dragging.enable();
+ }
+ }
+
+ setDoubleClickZoom() {
+ if (!this.ctrl.settings.doubleClickZoom) {
+ this.map.doubleClickZoom.disable();
+ } else {
+ this.map.doubleClickZoom.enable();
+ }
+ }
+
addCircles(circles) {
// Todo: Optionally add fixed custom attributions to the circle layer.
const attribution = undefined;
diff --git a/src/worldmap_ctrl.ts b/src/worldmap_ctrl.ts
index 695b1a8..ad711fe 100644
--- a/src/worldmap_ctrl.ts
+++ b/src/worldmap_ctrl.ts
@@ -40,6 +40,8 @@ const panelDefaults = {
customAttribution: false,
customAttributionText: null,
mouseWheelZoom: false,
+ dragging: true,
+ doubleClickZoom: true,
esGeoPoint: null,
// Todo: Investigate: Is "Count" a reasonable default here
// or does it confuse the operator?
@@ -504,6 +506,16 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
this.render();
}
+ toggleDragging() {
+ this.map.setDragging();
+ this.render();
+ }
+
+ toggleDoubleClickZoom() {
+ this.map.setDoubleClickZoom();
+ this.render();
+ }
+
toggleCustomAttribution() {
if (this.settings.customAttribution) {
const attributionControl = this.map.map.attributionControl;