From 2675f69e2b13c68540a53d366436fb8f0e4f677f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 30 Dec 2014 01:23:00 -0800 Subject: [PATCH] GUAC-963: Changes to thumbnail size should NOT be sent as Guacamole size events. The thumbnail view should not affect the client at all. --- .../app/client/directives/guacThumbnail.js | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/directives/guacThumbnail.js b/guacamole/src/main/webapp/app/client/directives/guacThumbnail.js index 99956b769..25668ddd0 100644 --- a/guacamole/src/main/webapp/app/client/directives/guacThumbnail.js +++ b/guacamole/src/main/webapp/app/client/directives/guacThumbnail.js @@ -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); - }); }]