mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Implement size for buffers.
This commit is contained in:
@@ -655,24 +655,35 @@ Guacamole.Client = function(tunnel) {
|
|||||||
var width = parseInt(parameters[1]);
|
var width = parseInt(parameters[1]);
|
||||||
var height = parseInt(parameters[2]);
|
var height = parseInt(parameters[2]);
|
||||||
|
|
||||||
// Resize layer
|
// If not buffer, resize layer and container
|
||||||
var layer_container = getLayerContainer(layer_index);
|
if (layer_index >= 0) {
|
||||||
layer_container.resize(width, height);
|
|
||||||
|
|
||||||
// If layer is default, resize display
|
// Resize layer
|
||||||
if (layer_index == 0) {
|
var layer_container = getLayerContainer(layer_index);
|
||||||
|
layer_container.resize(width, height);
|
||||||
|
|
||||||
displayWidth = width;
|
// If layer is default, resize display
|
||||||
displayHeight = height;
|
if (layer_index == 0) {
|
||||||
|
|
||||||
// Update (set) display size
|
displayWidth = width;
|
||||||
display.style.width = displayWidth + "px";
|
displayHeight = height;
|
||||||
display.style.height = displayHeight + "px";
|
|
||||||
|
|
||||||
// Update bounds size
|
// Update (set) display size
|
||||||
bounds.style.width = (displayWidth*displayScale) + "px";
|
display.style.width = displayWidth + "px";
|
||||||
bounds.style.height = (displayHeight*displayScale) + "px";
|
display.style.height = displayHeight + "px";
|
||||||
|
|
||||||
|
// Update bounds size
|
||||||
|
bounds.style.width = (displayWidth*displayScale) + "px";
|
||||||
|
bounds.style.height = (displayHeight*displayScale) + "px";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// If buffer, resize layer only
|
||||||
|
else {
|
||||||
|
var layer = getBufferLayer(parseInt(parameters[0]));
|
||||||
|
layer.resize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user