From 168590a1b7170fbccbfc4acdd3fb3632319c46d7 Mon Sep 17 00:00:00 2001 From: Gunther Brunner Date: Wed, 19 Feb 2014 23:26:06 +0900 Subject: [PATCH] Ready to show/hide screen, but still needs to create an isolated scope. --- res/app/components/stf/screen/screen-controller.js | 2 +- res/app/components/stf/screen/screen-directive.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/res/app/components/stf/screen/screen-controller.js b/res/app/components/stf/screen/screen-controller.js index 5a7a66f2..3d7dc5b4 100644 --- a/res/app/components/stf/screen/screen-controller.js +++ b/res/app/components/stf/screen/screen-controller.js @@ -2,7 +2,7 @@ module.exports = function DeviceScreenCtrl($scope, ScalingService) { $scope.ready = false $scope.displayError = false $scope.canView = true - $scope.showView = true + $scope.showScreen = true $scope.ScalingService = ScalingService $scope.promiseOfDevice.then(function () { diff --git a/res/app/components/stf/screen/screen-directive.js b/res/app/components/stf/screen/screen-directive.js index 2c2d72ed..6ad4034d 100644 --- a/res/app/components/stf/screen/screen-directive.js +++ b/res/app/components/stf/screen/screen-directive.js @@ -41,7 +41,7 @@ module.exports = function DeviceScreenDirective($document, ScalingService, $root } }) - scope.$watch('showView', function (val) { + scope.$watch('showScreen', function (val) { if (val) { loadScreen(); } else { @@ -70,7 +70,7 @@ module.exports = function DeviceScreenDirective($document, ScalingService, $root } loader.onload = function () { - if (scope.canView && scope.showView) { + if (scope.canView && scope.showScreen) { // Sets the size only if updated if (cached.displayWidth !== displayWidth || cached.displayHeight !== displayHeight ||