diff --git a/res/app/components/stf/standalone/standalone-service.js b/res/app/components/stf/standalone/standalone-service.js index 4aa43d62..a5816b77 100644 --- a/res/app/components/stf/standalone/standalone-service.js +++ b/res/app/components/stf/standalone/standalone-service.js @@ -100,14 +100,14 @@ module.exports = // TODO: Resize on-demand //newWindow.onresize = function (e) { - // var windowWidth = e.target.innerWidth - // var windowHeight = e.target.innerHeight + // var windowWidth = e.target.outerWidth + // var windowHeight = e.target.outerHeight // // var newWindowWidth = Math.floor(projected.width * windowHeight / projected.height) // console.log('newWindowWidth', newWindowWidth) // console.log('windowWidth', windowWidth) // - // newWindow.resizeTo(windowWidth, windowHeight) + // newWindow.resizeTo(newWindowWidth, windowHeight) //} } diff --git a/res/app/control-panes/control-panes-hotkeys-controller.js b/res/app/control-panes/control-panes-hotkeys-controller.js index 7abe07fa..5925d9dd 100644 --- a/res/app/control-panes/control-panes-hotkeys-controller.js +++ b/res/app/control-panes/control-panes-hotkeys-controller.js @@ -1,5 +1,6 @@ module.exports = - function ($scope, gettext, $location, $rootScope, ScopedHotkeysService) { + function ($scope, gettext, $location, $rootScope, ScopedHotkeysService, + $window) { $scope.remotePaneSize = '30% + 2px' @@ -34,6 +35,11 @@ module.exports = angle -= 90 } $scope.control.rotate(angle) + + if ($rootScope.standalone) { + $window.resizeTo($window.outerHeight, $window.outerWidth) + } + }, rotateRight: function () { var angle = 0 @@ -46,6 +52,10 @@ module.exports = angle += 90 } $scope.control.rotate(angle) + + if ($rootScope.standalone) { + $window.resizeTo($window.outerHeight, $window.outerWidth) + } }, focusUrlBar: function () { // TODO: Switch tab and focus diff --git a/res/app/control-panes/device-control/device-control-controller.js b/res/app/control-panes/device-control/device-control-controller.js index fb7dc527..dd26f98c 100644 --- a/res/app/control-panes/device-control/device-control-controller.js +++ b/res/app/control-panes/device-control/device-control-controller.js @@ -1,7 +1,7 @@ var _ = require('lodash') module.exports = function DeviceControlCtrl($scope, DeviceService, GroupService, - $location, $timeout) { + $location, $timeout, $window, $rootScope) { $scope.showScreen = true @@ -108,6 +108,10 @@ module.exports = function DeviceControlCtrl($scope, DeviceService, GroupService, angle -= 90 } $scope.control.rotate(angle) + + if ($rootScope.standalone) { + $window.resizeTo($window.outerHeight, $window.outerWidth) + } } $scope.rotateRight = function () { @@ -121,6 +125,10 @@ module.exports = function DeviceControlCtrl($scope, DeviceService, GroupService, angle += 90 } $scope.control.rotate(angle) + + if ($rootScope.standalone) { + $window.resizeTo($window.outerHeight, $window.outerWidth) + } } }