瀏覽代碼

Fix issue with fps counter

Sebastien Lebreton 5 年之前
父節點
當前提交
fb82ec9b0e
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 0 1
      Playground/css/index.css
  2. 5 3
      Playground/js/menuPG.js

+ 0 - 1
Playground/css/index.css

@@ -759,7 +759,6 @@ body {
     left: 0;
     right: 0;
     bottom: 0;
-    z-index: 8;
 }
 
 /* Media queries */

+ 5 - 3
Playground/js/menuPG.js

@@ -104,10 +104,12 @@ class MenuPG {
                 return;
             }
 
-            if (document.getElementById("saveLayer").style.display === "block") {
-                return;
+            // we do not want to proceed if a menu is displayed or if we are in diff mode
+            const candidates = ["saveLayer", "diffLayer", "diffView"];
+            if (candidates.every(c => !(document.getElementById(c).style.display === "block"))) {
+                this.removeAllOptions();
             }
-            this.removeAllOptions();
+
         }.bind(this));
 
         // Version selection