mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Provide explicit means of exiting panning mode (fixes #223).
This commit is contained in:
@@ -255,6 +255,18 @@ GuacUI.Client.PanOverlay = function() {
|
||||
GuacUI.createChildElement(pan_overlay, "div", "indicator right");
|
||||
GuacUI.createChildElement(pan_overlay, "div", "indicator left");
|
||||
|
||||
/*
|
||||
* Add exit button
|
||||
*/
|
||||
|
||||
var back = GuacUI.createChildElement(pan_overlay, "p", "hint");
|
||||
back.textContent = "Tap here to exit panning mode";
|
||||
|
||||
// Return to interactive when back is clicked
|
||||
back.addEventListener("click", function() {
|
||||
GuacUI.StateManager.setState(GuacUI.Client.states.INTERACTIVE);
|
||||
}, false);
|
||||
|
||||
this.show = function() {
|
||||
document.body.appendChild(pan_overlay);
|
||||
};
|
||||
|
@@ -263,3 +263,22 @@ div#viewportClone {
|
||||
color: #D44;
|
||||
}
|
||||
|
||||
p.hint {
|
||||
|
||||
border: 0.25em solid rgba(255, 255, 255, 0.25);
|
||||
background: black;
|
||||
opacity: 0.75;
|
||||
|
||||
color: white;
|
||||
|
||||
max-width: 10em;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
box-shadow: 0.25em 0.25em 0.25em rgba(0, 0, 0, 0.75);
|
||||
|
||||
}
|
Reference in New Issue
Block a user