Convert PanOverlay.

This commit is contained in:
Michael Jumper
2012-11-12 02:02:05 -08:00
parent f5e754dd5d
commit 0d091e925f
3 changed files with 12 additions and 13 deletions

View File

@@ -40,8 +40,6 @@
</div> </div>
</div> </div>
<div id="pan-overlay"></div>
<!-- On-screen keyboard --> <!-- On-screen keyboard -->
<div id="keyboardContainer"></div> <div id="keyboardContainer"></div>

View File

@@ -59,7 +59,6 @@ GuacUI.Client = {
"keyboard" : document.getElementById("keyboardContainer") "keyboard" : document.getElementById("keyboardContainer")
}, },
"pan_overlay" : document.getElementById("pan-overlay"),
"state" : document.getElementById("statusText"), "state" : document.getElementById("statusText"),
"client" : null, "client" : null,
"sessionState" : new GuacamoleSessionState(), "sessionState" : new GuacamoleSessionState(),
@@ -254,14 +253,19 @@ GuacUI.StateManager.registerComponent(
* @constructor * @constructor
* @augments GuacUI.Component * @augments GuacUI.Component
*/ */
GuacUI.Client.PanOverlay = function(pan_overlay) { GuacUI.Client.PanOverlay = function() {
/**
* Overlay which will provide the means of scrolling the screen.
*/
var pan_overlay = GuacUI.createElement("div", "pan-overlay");
this.show = function() { this.show = function() {
pan_overlay.style.display = "block"; document.body.appendChild(pan_overlay);
}; };
this.hide = function() { this.hide = function() {
pan_overlay.style.display = "none"; document.body.removeChild(pan_overlay);
}; };
/* /*
@@ -281,9 +285,7 @@ GuacUI.Client.PanOverlay.prototype = new GuacUI.Component();
*/ */
GuacUI.StateManager.registerComponent( GuacUI.StateManager.registerComponent(
new GuacUI.Client.PanOverlay( new GuacUI.Client.PanOverlay(),
document.getElementById("pan-overlay")
),
GuacUI.Client.states.PAN, GuacUI.Client.states.PAN,
GuacUI.Client.states.PAN_TYPING GuacUI.Client.states.PAN_TYPING
); );

View File

@@ -191,13 +191,12 @@ div.magnifier {
} }
div#pan-overlay { .pan-overlay {
display: none;
width: 100%;
height: 100%;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%;
height: 100%;
} }
/* Viewport Clone */ /* Viewport Clone */