Browse Source

Fixed flow window snap offset when window resize issue

tobychui 3 years ago
parent
commit
58f0d03cd6
1 changed files with 5 additions and 1 deletions
  1. 5 1
      web/desktop.system

+ 5 - 1
web/desktop.system

@@ -2059,6 +2059,7 @@
                         width: originalSize[0],
                         height: originalSize[1],
                         left: newLeft,
+                        right: "auto",
                         top: event.Y - 2
                     });
                     clickDownOffset[0] = clickRatio * originalSize[0];
@@ -2085,6 +2086,7 @@
                 $(object).find(".iframecover").hide();
                 movingWindow = false;
 
+                //Float Window Snapping Logic
                 //Check if the window location is drag to the edge of the screen. If yes, toggle half screen fullscreen
                 //Not need to check for if max because it must be minimized during drag move
                 var dockMode = false;
@@ -2096,6 +2098,7 @@
                         width: "50%",
                         height: "calc(100% - 36px)",
                         left: "0px",
+                        right: "auto",
                         top: "0px"
                     });
                     $(object).attr("max", "true");
@@ -2107,7 +2110,8 @@
                     $(object).css({
                         width: "50%",
                         height: "calc(100% - 36px)",
-                        left: (window.innerWidth / 2) + "px",
+                        right: "0px",
+                        left: "auto",
                         top: "0px"
                     });
                     $(object).attr("max", "true");