summaryrefslogtreecommitdiff
path: root/app/ui.js
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2019-10-14 10:15:19 +0200
committerPierre Ossman <ossman@cendio.se>2019-10-14 10:15:19 +0200
commitf2d42dc3577d921ac8f51c029729b3fca275c483 (patch)
treec2b768380f68cf297873b33f0d786f7a5d935b9c /app/ui.js
parent412d93060dd26a69dd02debe8074364bbb1937e8 (diff)
downloadnovnc-f2d42dc3577d921ac8f51c029729b3fca275c483.tar.gz
Never show drag icon if clipping is disabled
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.
Diffstat (limited to 'app/ui.js')
-rw-r--r--app/ui.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/app/ui.js b/app/ui.js
index e5cd13a..0148a44 100644
--- 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");
}
},