mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-810: Resize client display depending only on containing element, not entire window.
This commit is contained in:
@@ -115,6 +115,13 @@ angular.module('client').directive('guacClient', [function guacClient() {
|
||||
*/
|
||||
var main = $element[0];
|
||||
|
||||
/**
|
||||
* The element which functions as a detector for size changes.
|
||||
*
|
||||
* @type Element
|
||||
*/
|
||||
var resizeSensor = $element.find('.resize-sensor')[0];
|
||||
|
||||
/**
|
||||
* Guacamole mouse event object, wrapped around the main client
|
||||
* display.
|
||||
@@ -491,8 +498,8 @@ angular.module('client').directive('guacClient', [function guacClient() {
|
||||
$scope.clientProperties.scale = $scope.clientProperties.minScale;
|
||||
});
|
||||
|
||||
// If the window is resized, attempt to resize client
|
||||
$window.addEventListener('resize', function onResizeWindow() {
|
||||
// If the element is resized, attempt to resize client
|
||||
resizeSensor.contentWindow.addEventListener('resize', function mainElementResized() {
|
||||
|
||||
// Send new display size, if changed
|
||||
if (client && display) {
|
||||
|
Reference in New Issue
Block a user