浏览代码

环境调节页面继续优化

zhaojijng 2 年之前
父节点
当前提交
172517caae

+ 1 - 0
src/layouts/index.less

@@ -4,6 +4,7 @@
   height: 100%;
   margin: 0 auto;
   padding: 20px 50px;
+  text-decoration: none;
   user-select: none;
 }
 

+ 3 - 0
src/pages/Equipment/index.tsx

@@ -540,6 +540,9 @@ const Environment: React.FC = () => {
                           //event.stopPropagation();
                           lastTime = new Date().getTime();
                         }}
+                        style={{
+                          transform: `scale(${scale},${scale})`,
+                        }}
                       >
                         <Icon className="" type="hover"></Icon>
                       </div>

+ 3 - 2
src/sagacare_components/map/index.less

@@ -165,8 +165,8 @@
     cursor: pointer;
     .showModal {
       position: absolute;
-      right: 6px;
-      bottom: 7px;
+      right: 5px;
+      bottom: 5px;
       z-index: 2;
       display: flex;
       display: none;
@@ -177,6 +177,7 @@
       font-size: 12px;
       background: #fff;
       border-radius: 22px;
+      transform-origin: 100% 100%;
     }
     &:hover .showModal {
       display: flex;

+ 3 - 4
src/sagacare_components/map/index.tsx

@@ -145,7 +145,6 @@ const Map: React.FC<MapProps> = ({ type, selFloorId, render, mapList, changeMapL
       changeSearchText({}); //清空搜索记录 好进行一些操作
     } else if (currentFloorId.current != selFloorId) {
       //如果两次的selFloorId 不一样 才会更改地图的位置为0 0
-      debugger;
       setTranslateX(0);
       setTranslateY(0);
     }
@@ -206,9 +205,9 @@ const Map: React.FC<MapProps> = ({ type, selFloorId, render, mapList, changeMapL
         if (event.deltaY > 0) console.log('向内');
         if (event.deltaY < 0) console.log('向外');
         var base = -0.009;
-        // if (event.deltaY > 100 || event.deltaY < -100) {
-        //   base = -0.0006;
-        // }
+        if (event.deltaY > 100 || event.deltaY < -100) {
+          base = -0.0006;
+        }
         var mscaleTemp = mscale.current + event.deltaY * base; //缩放倍率缓存
         //console.log('mscaleTemp', mscale.current, mscaleTemp);
         mscale.current = Math.min(Math.max(minscale, mscaleTemp), maxscale); //缩放倍率赋值

+ 1 - 0
src/sagacare_components/topNavigator/index.less

@@ -54,6 +54,7 @@
       line-height: 1;
     }
     .value {
+      margin-right: 2px;
       // color: #e5574f;
       font-size: 30px;
     }