GUAC-901: Allow client display to be scrolled via properties.

This commit is contained in:
Michael Jumper
2014-12-20 22:57:02 -08:00
parent 2623ba3196
commit 2f74f5025c
2 changed files with 28 additions and 0 deletions

View File

@@ -318,6 +318,18 @@ angular.module('client').directive('guacClient', [function guacClient() {
client.setClipboard(data);
});
/*
* SCROLLING
*/
$scope.$watch('clientProperties.scrollLeft', function scrollLeftChanged(newValue, oldValue) {
main.scrollLeft += newValue - oldValue;
});
$scope.$watch('clientProperties.scrollTop', function scrollTopChanged(newValue, oldValue) {
main.scrollTop += newValue - oldValue;
});
/*
* CONNECT / RECONNECT
*/

View File

@@ -83,6 +83,22 @@ angular.module('client').factory('ClientProperties', [function defineClientPrope
*/
this.emulateAbsoluteMouse = template.emulateAbsoluteMouse || true;
/**
* The relative Y coordinate of the scroll offset of the display within
* the client element.
*
* @type Number
*/
this.scrollTop = template.scrollTop || 0;
/**
* The relative X coordinate of the scroll offset of the display within
* the client element.
*
* @type Number
*/
this.scrollLeft = template.scrollLeft || 0;
};
return ClientProperties;