mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +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;
|
||||
|
||||
/**
|
||||
* The current Guacamole client instance.
|
||||
*
|
||||
* @type Guacamole.Client
|
||||
*/
|
||||
var client = null;
|
||||
|
||||
/**
|
||||
* The display of the current Guacamole client instance.
|
||||
*
|
||||
@@ -130,7 +123,7 @@ angular.module('client').directive('guacThumbnail', [function guacThumbnail() {
|
||||
return;
|
||||
|
||||
// Get Guacamole client instance
|
||||
client = managedClient.client;
|
||||
var client = managedClient.client;
|
||||
|
||||
// Attach possibly new display
|
||||
display = client.getDisplay();
|
||||
@@ -172,21 +165,7 @@ angular.module('client').directive('guacThumbnail', [function guacThumbnail() {
|
||||
|
||||
// If the element is resized, attempt to resize client
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
}]
|
||||
|
Reference in New Issue
Block a user