zhaobao 1 рік тому
батько
коміт
8b78f96e4c

+ 2 - 3
src/views/bigScreen/home/components/Map/index.vue

@@ -89,7 +89,7 @@ export default {
         }
         return yx(y, x)
       }
-      var bounds = [xy(-600, -600), xy(300, 300)]
+      var bounds = [xy(-800, -600), xy(500, 300)]
       this.map = L.map('vmap', {
         crs: L.CRS.Simple, // 一个简单的CRS,可将经度和纬度直接映射到x其中y。可用于平面地图(例如游戏地图)
         minZoom: -0.65,
@@ -117,7 +117,7 @@ export default {
         }
         return yx(y, x)
       }
-      var bounds = [xy(-600, -600), xy(300, 300)]
+      var bounds = [xy(-800, -600), xy(500, 300)]
       if (this.imageOverlay) {
         this.imageOverlay.setUrl(this.viewData.mapRasterLayer)
       } else {
@@ -125,7 +125,6 @@ export default {
       }
 
       this.map.fitBounds(bounds)
-      this.map.scrollWheelZoom.disable()
       this.getMapLayers()
     },
 

+ 7 - 3
src/views/bigScreen/home/index.vue

@@ -142,6 +142,7 @@ export default {
     justify-content: space-between;
     .side-left,.side-right{
         width: 26.66%;
+        width: calc((100% - 830px)/2);
         height: 100%;
         background-image: url(./images/home/leftbg.png);
         background-size: 100% 100%;
@@ -150,6 +151,8 @@ export default {
         justify-content: space-between;
         flex-direction: column;
         overflow-y: auto;
+        box-sizing: border-box;
+        overflow-x: hidden;
         &.side-left{
           min-width: 432px;
         }
@@ -353,10 +356,11 @@ export default {
         }
     }
     .main{
-        width: 46.68%;
+        // width: 46.68%;
         height: 100%;
-        flex:1;
-        padding: 0 14px;
+        width: 835px;
+        box-sizing: border-box;
+        // padding: 0 14px;
         .map-component{
           height: 66.6%;
         }

+ 4 - 4
src/views/goaf/map/components/VisualEditor.vue

@@ -144,10 +144,10 @@ export default {
         }
         return yx(y, x)
       }
-      var bounds = [xy(-600, -600), xy(300, 300)]
+      var bounds = [xy(-800, -600), xy(500, 300)]
       this.map = L.map('vmap', {
         crs: L.CRS.Simple, // 一个简单的CRS,可将经度和纬度直接映射到x其中y。可用于平面地图(例如游戏地图)
-        minZoom: 0,
+        minZoom: -0.4,
         maxZoom: 1,
         zoom: 1,
         maxBounds: bounds, // 地图拖动到边界后自动弹回
@@ -172,7 +172,7 @@ export default {
         }
         return yx(y, x)
       }
-      var bounds = [xy(-600, -600), xy(300, 300)]
+      var bounds = [xy(-800, -600), xy(500, 300)]
       if (this.imageOverlay) {
         this.imageOverlay.setUrl(this.viewData.mapRasterLayer)
       } else {
@@ -180,7 +180,7 @@ export default {
       }
 
       this.map.fitBounds(bounds)
-      this.map.scrollWheelZoom.disable()
+      // this.map.scrollWheelZoom.disable()
       this.getMapLayers()
     },