root 2 years ago
parent
commit
f1b4153990
1 changed files with 5 additions and 5 deletions
  1. 5 5
      js/gm/DeskTop.js

+ 5 - 5
js/gm/DeskTop.js

@@ -428,23 +428,23 @@ U.MD.D.iconPostion = function(childs, top, left) {
     //循环所有的图标,设置每个图标的间距,打印顺序是竖排打印的方式
     for (i = 0; i < childs.length; i++) {
         //如果竖排top超过了范围处理
-        if (top + 150 > US.height - 10) {
+        if (left + 150 > US.width - 10) {
             //left超过了页面范围处理,则向上重叠打印处理
-            if ((left + 180) > US.width) {
+            if ((top + 180) > US.Height) {
                 top -= 150;
                 left -= 150;
             }
             //没有超过范围,那么left+90添加到下一个竖排打印
             else {
-                left += 150;
-                top = 15;
+                top += 150;
+                left = 20;
             };
         }
         //给图标的位置赋值
         U.selectEl(childs[i]).css({ top: top + "px", left: left + "px" });
         if (i < childs.length - 1) {
             //页面图标每次向下加95
-            top += 150;
+            left += 150;
         }
     }
     //返回最后调用的图标的位置