// State change disables viewport dragging.
// It is enabled (toggled) by direct click on the button
UI.setViewDrag(false);
+ UI.updateViewDragButton();
switch (UI.rfb_state) {
case 'fatal':
setViewDrag: function(drag) {
if (!UI.rfb) return;
- UI.updateViewDragButton();
-
if (typeof(drag) === "undefined" ||
typeof(drag) === "object") {
// If not specified, then toggle
if (UI.rfb_state === 'normal' &&
UI.rfb.get_display().get_viewport() &&
UI.rfb.get_display().clippingDisplay()) {
+ // Enable the viewport drag button
vmb.style.display = "inline";
+ vmb.disabled = false;
+
+ } else if (UI.rfb_state === 'normal' &&
+ UI.isTouchDevice) {
+ // Disable the viewport drag button
+ vmb.style.display = "inline";
+ vmb.disabled = true;
+
} else {
+ // Hide the viewport drag button
vmb.style.display = "none";
}
},