잉여개발기 (SPDV) 3 anni fa
parent
commit
88958a9e70
2 ha cambiato i file con 12 aggiunte e 5 eliminazioni
  1. 1 1
      version.json
  2. 11 4
      views/main_css/js/route/render.js

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.6-RC3-dev156",
+        "r_ver" : "v3.4.6-RC3-dev157",
         "c_ver" : "3500361",
         "s_ver" : "3500111"
     }

+ 11 - 4
views/main_css/js/route/render.js

@@ -138,12 +138,13 @@ function opennamu_do_footnote_popover(set_name, load_name) {
         document.getElementById(set_name + '_load').style.display = "inline-block";
 
         let width = document.getElementById(set_name + '_load').clientWidth;
-        let screen_width = screen.availWidth;
+        let screen_width = window.innerWidth;
         let left = document.getElementById(set_name).getBoundingClientRect().left;
+        let left_org = document.getElementById(set_name + '_load').getBoundingClientRect().left;
         let top = document.getElementById(set_name).getBoundingClientRect().top;
-        console.log(width, screen_width, left);
+        console.log(width, screen_width, left, left_org);
         console.log(screen_width - (left + width));
-        if(screen_width - (left + width) < 30) {
+        if(screen_width - (left + width) < 50) {
             console.log("test");
             if(left > 350) {
                 document.getElementById(set_name + '_load').style.left = String(left - 300) + "px";
@@ -151,7 +152,13 @@ function opennamu_do_footnote_popover(set_name, load_name) {
                 document.getElementById(set_name + '_load').style.left = "0px";
             }
 
-            document.getElementById(set_name + '_load').style.top = String(top + 20) + "px";
+            left = document.getElementById(set_name + '_load').getBoundingClientRect().left;
+            width = document.getElementById(set_name + '_load').clientWidth;
+            if(300 > width) {
+                document.getElementById(set_name + '_load').style.left = String(left + (300 - width)) + "px";
+            } else {
+                document.getElementById(set_name + '_load').style.marginTop = "20px";
+            }
         }
     } else {
         document.getElementById(set_name + '_load').style.display = "none";