diff --git a/src/main/js/bundles/dn_screenshot/ScreenshotControl.js b/src/main/js/bundles/dn_screenshot/ScreenshotControl.js
index e158910..cb08e5e 100644
--- a/src/main/js/bundles/dn_screenshot/ScreenshotControl.js
+++ b/src/main/js/bundles/dn_screenshot/ScreenshotControl.js
@@ -96,7 +96,7 @@ class ScreenshotControl{
}
abortDrawing() {
- if(this.canvas.onclick) {
+ if(this.canvas?.onclick) {
this.canvas.style.cursor = "default";
this.canvas.onclick = null;
}
diff --git a/src/main/js/bundles/dn_screenshot/ScreenshotUI.vue b/src/main/js/bundles/dn_screenshot/ScreenshotUI.vue
index fc500a7..86aef5c 100644
--- a/src/main/js/bundles/dn_screenshot/ScreenshotUI.vue
+++ b/src/main/js/bundles/dn_screenshot/ScreenshotUI.vue
@@ -81,9 +81,9 @@
min="0"
/>
-
{{ i18n.backgroundTitle }}
+ {{ i18n.backgroundTitle }}
{
- // bind basemap and vue
- let temp = {
- basemap: this.model.map.basemap != undefined
- }
- basemapToViewBinding.bindTo(temp, vm);
-
propertiesToViewBinding.enable().syncToRightNow();
screenshotToViewBinding.enable().syncToLeftNow();
basemapToViewBinding.enable().syncToRightNow();
@@ -85,7 +81,9 @@ class ScreenshotUIFactory {
}
declareBasemapToVueBinding() {
return Binding.create()
- .sync("basemap", ifDefined(), ifDefined());
+ .sync("selectedId" +
+ "" +
+ "", "basemap");
}
}
diff --git a/src/main/js/bundles/dn_screenshot/manifest.json b/src/main/js/bundles/dn_screenshot/manifest.json
index 42cf6ca..3c148a9 100644
--- a/src/main/js/bundles/dn_screenshot/manifest.json
+++ b/src/main/js/bundles/dn_screenshot/manifest.json
@@ -41,7 +41,8 @@
{
"name": "model",
"providing": "map-widget.MapWidgetModel"
- }, {
+ },
+ {
"name": "layerFactory",
"providing": "map-config-api.LayerFactory"
},
@@ -118,7 +119,12 @@
{
"name": "model",
"providing": "map-widget.MapWidgetModel"
- }, {
+ },
+ {
+ "name": "basemap",
+ "providing": "map-basemaps-api.BasemapsModel"
+ },
+ {
"name": "layerFactory",
"providing": "map-config-api.LayerFactory"
},