Add hint that the control bar can be moved
The control bar can be dragged to the other side, this isn't obvious however. This adds a hint on the opposite side in the form of a subtle glowing half-ellipse.
This commit is contained in:
@@ -627,6 +627,15 @@ const UI = {
|
||||
UI.controlbarDrag = true;
|
||||
},
|
||||
|
||||
showControlbarHint: function (show) {
|
||||
var hint = document.getElementById('noVNC_control_bar_hint');
|
||||
if (show) {
|
||||
hint.classList.add("noVNC_active");
|
||||
} else {
|
||||
hint.classList.remove("noVNC_active");
|
||||
}
|
||||
},
|
||||
|
||||
dragControlbarHandle: function (e) {
|
||||
if (!UI.controlbarGrabbed) return;
|
||||
|
||||
@@ -722,6 +731,7 @@ const UI = {
|
||||
UI.activateControlbar();
|
||||
}
|
||||
UI.controlbarGrabbed = false;
|
||||
UI.showControlbarHint(false);
|
||||
},
|
||||
|
||||
controlbarHandleMouseDown: function(e) {
|
||||
@@ -740,6 +750,8 @@ const UI = {
|
||||
UI.controlbarGrabbed = true;
|
||||
UI.controlbarDrag = false;
|
||||
|
||||
UI.showControlbarHint(true);
|
||||
|
||||
UI.controlbarMouseDownClientY = ptr.clientY;
|
||||
UI.controlbarMouseDownOffsetY = ptr.clientY - bounds.top;
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user