mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUAC-963: Changes to thumbnail size should NOT be sent as Guacamole size events. The thumbnail view should not affect the client at all.
This commit is contained in:
@@ -60,13 +60,6 @@ angular.module('client').directive('guacThumbnail', [function guacThumbnail() {
|
|||||||
*/
|
*/
|
||||||
var THUMBNAIL_HEIGHT = 240;
|
var THUMBNAIL_HEIGHT = 240;
|
||||||
|
|
||||||
/**
|
|
||||||
* The current Guacamole client instance.
|
|
||||||
*
|
|
||||||
* @type Guacamole.Client
|
|
||||||
*/
|
|
||||||
var client = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The display of the current Guacamole client instance.
|
* The display of the current Guacamole client instance.
|
||||||
*
|
*
|
||||||
@@ -130,7 +123,7 @@ angular.module('client').directive('guacThumbnail', [function guacThumbnail() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Get Guacamole client instance
|
// Get Guacamole client instance
|
||||||
client = managedClient.client;
|
var client = managedClient.client;
|
||||||
|
|
||||||
// Attach possibly new display
|
// Attach possibly new display
|
||||||
display = client.getDisplay();
|
display = client.getDisplay();
|
||||||
@@ -172,21 +165,7 @@ angular.module('client').directive('guacThumbnail', [function guacThumbnail() {
|
|||||||
|
|
||||||
// If the element is resized, attempt to resize client
|
// If the element is resized, attempt to resize client
|
||||||
resizeSensor.contentWindow.addEventListener('resize', function mainElementResized() {
|
resizeSensor.contentWindow.addEventListener('resize', function mainElementResized() {
|
||||||
|
|
||||||
// Send new display size, if changed
|
|
||||||
if (client && display) {
|
|
||||||
|
|
||||||
var pixelDensity = $window.devicePixelRatio || 1;
|
|
||||||
var width = main.offsetWidth * pixelDensity;
|
|
||||||
var height = main.offsetHeight * pixelDensity;
|
|
||||||
|
|
||||||
if (display.getWidth() !== width || display.getHeight() !== height)
|
|
||||||
client.sendSize(width, height);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.$apply(updateDisplayScale);
|
$scope.$apply(updateDisplayScale);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}]
|
}]
|
||||||
|
Reference in New Issue
Block a user