Browse Source

Merge branch '02/23reviewBUG' into jenkins

mo 2 years ago
parent
commit
b64ee99d97
1 changed files with 6 additions and 5 deletions
  1. 6 5
      src/utils/draggable.js

+ 6 - 5
src/utils/draggable.js

@@ -24,18 +24,19 @@ const draggable = {
           x = maxX
         }
 
-        if (y < 0) {
-          y = 0
+        if (y < 150) {
+          y = 150
         } else if (y > maxY) {
-          y = maxY
+          // y = maxY
         }
 
         if(x>wrap.offsetWidth-35){
           x = wrap.offsetWidth-35
         }
+        if(y>wrap.offsetHeight-94){
+          y=wrap.offsetHeight-94
+        }
         el.style.left = x + 'px'
-
-        console.log(x,'新坐标',el)
         el.style.top = y + 'px'
         lastTime = new Date().getTime();
         if( (lastTime - firstTime) < 200){