Fixed layer positioning.

This commit is contained in:
Michael Jumper
2011-02-20 13:50:22 -08:00
parent 4571135a08
commit 4d1717146f
2 changed files with 6 additions and 5 deletions

View File

@@ -34,6 +34,9 @@ function GuacamoleClient(display, tunnelURL) {
var stateChangeHandler = null; var stateChangeHandler = null;
var pollResponse = 1; // Default to polling - will be turned off automatically if not needed var pollResponse = 1; // Default to polling - will be turned off automatically if not needed
// Display must be relatively positioned for mouse to be handled properly
display.style.position = "relative";
function setState(state) { function setState(state) {
if (state != currentState) { if (state != currentState) {
currentState = state; currentState = state;
@@ -560,10 +563,8 @@ function GuacamoleClient(display, tunnelURL) {
displayHeight = parseInt(parameters[1]); displayHeight = parseInt(parameters[1]);
// Update (set) display size // Update (set) display size
if (display) {
display.style.width = displayWidth + "px"; display.style.width = displayWidth + "px";
display.style.height = displayHeight + "px"; display.style.height = displayHeight + "px";
}
// Set cursor layer width/height // Set cursor layer width/height
if (cursor != null) if (cursor != null)

View File

@@ -26,7 +26,7 @@ function Layer(width, height) {
function resize(newWidth, newHeight) { function resize(newWidth, newHeight) {
display.style.position = "absolute"; display.style.position = "absolute";
display.style.left = "0px"; display.style.left = "0px";
display.style.right = "0px"; display.style.top = "0px";
display.width = newWidth; display.width = newWidth;
display.height = newHeight; display.height = newHeight;