mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 22:51:22 +00:00
GUAC-1053: Add preference service, storing the default mouse emulation mode and input method.
This commit is contained in:
@@ -34,6 +34,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
||||
var $location = $injector.get('$location');
|
||||
var guacClientManager = $injector.get('guacClientManager');
|
||||
var guacNotification = $injector.get('guacNotification');
|
||||
var preferenceService = $injector.get('preferenceService');
|
||||
var userPageService = $injector.get('userPageService');
|
||||
|
||||
/**
|
||||
@@ -196,7 +197,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
||||
*
|
||||
* @type String
|
||||
*/
|
||||
inputMethod : 'none',
|
||||
inputMethod : preferenceService.preferences.inputMethod,
|
||||
|
||||
/**
|
||||
* The current scroll state of the menu.
|
||||
|
@@ -23,8 +23,11 @@
|
||||
/**
|
||||
* A service for generating new guacClient properties objects.
|
||||
*/
|
||||
angular.module('client').factory('ClientProperties', [function defineClientProperties() {
|
||||
|
||||
angular.module('client').factory('ClientProperties', ['$injector', function defineClientProperties($injector) {
|
||||
|
||||
// Required services
|
||||
var preferenceService = $injector.get('preferenceService');
|
||||
|
||||
/**
|
||||
* Object used for interacting with a guacClient directive.
|
||||
*
|
||||
@@ -81,7 +84,7 @@ angular.module('client').factory('ClientProperties', [function defineClientPrope
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
this.emulateAbsoluteMouse = template.emulateAbsoluteMouse || true;
|
||||
this.emulateAbsoluteMouse = template.emulateAbsoluteMouse || preferenceService.preferences.emulateAbsoluteMouse;
|
||||
|
||||
/**
|
||||
* The relative Y coordinate of the scroll offset of the display within
|
||||
|
Reference in New Issue
Block a user