]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Never show drag icon if clipping is disabled
authorPierre Ossman <ossman@cendio.se>
Mon, 14 Oct 2019 08:15:19 +0000 (10:15 +0200)
committerPierre Ossman <ossman@cendio.se>
Mon, 14 Oct 2019 08:15:19 +0000 (10:15 +0200)
Toggling the enabled state is a remnant from an earlier version
of the code where we could determine if the the session is actually
clipped, and not just that the setting is enabled.

Right now we only change things based on the setting, so let's
completely hide the button when clipping is disabled.

app/ui.js

index e5cd13ae5aeb791900c972ce023b1c14af9de823..0148a4409518208a4682b1fe2ac0bb2320e7a908 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -1299,24 +1299,10 @@ const UI = {
             viewDragButton.classList.remove("noVNC_selected");
         }
 
-        // Different behaviour for touch vs non-touch
-        // The button is disabled instead of hidden on touch devices
-        if (isTouchDevice) {
+        if (UI.rfb.clipViewport) {
             viewDragButton.classList.remove("noVNC_hidden");
-
-            if (UI.rfb.clipViewport) {
-                viewDragButton.disabled = false;
-            } else {
-                viewDragButton.disabled = true;
-            }
         } else {
-            viewDragButton.disabled = false;
-
-            if (UI.rfb.clipViewport) {
-                viewDragButton.classList.remove("noVNC_hidden");
-            } else {
-                viewDragButton.classList.add("noVNC_hidden");
-            }
+            viewDragButton.classList.add("noVNC_hidden");
         }
     },