isv-robot 2 år sedan
förälder
incheckning
ad255e95ba
1 ändrade filer med 9 tillägg och 5 borttagningar
  1. 9 5
      src/views/dashboard-screen/chart-map/chartMap.vue

+ 9 - 5
src/views/dashboard-screen/chart-map/chartMap.vue

@@ -11,11 +11,12 @@ export default {
   name: 'ChartMap',
   data() {
     return {
-      config: []
+      config: [],
+      imgViewer: null
     }
   },
   created() {
-    window['mapFrame'] = this.$refs.mapFrame
+    window['mapIs'] = this
   },
   mounted() {
     this.$refs.mapFrame.onload = () => {
@@ -67,9 +68,12 @@ export default {
 
     loadImage(path) {
       console.log('loadImage', path)
-      this.$viewerApi({
-        images: [`/static${path}`],
-      })
+      if(!this.imgViewer?.isShown){
+        this.imgViewer = this.$viewerApi({
+          images: [`/static${path}`],
+        })
+      }
+
 
     }
   }