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:
Michael Jumper
2014-12-30 01:23:00 -08:00
parent ae39fc9855
commit 2675f69e2b

View File

@@ -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);
});
}]