From eabc4988d8627690a0a1111a9a163cbe03692bca Mon Sep 17 00:00:00 2001 From: ARC Date: Wed, 29 Apr 2015 20:37:28 -0400 Subject: fixed modals to make sure images load only when user taps on view button. No sense in wasting memory. Image override directives are being called correctly. Now I need to expriment with how to overwrite image frames when ZMS is still sending data to the client to avoid the blank screen issue --- www/js/EventCtrl.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'www/js/EventCtrl.js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 604458a2..283ffa39 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -44,14 +44,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion // This is a modal to show the event footage - $ionicModal.fromTemplateUrl('templates/events-modal.html', { - scope: $scope, - animation: 'slide-in-up' - }) - .then(function (modal) { - $scope.modal = modal; - }); var eventCommands = { next: "13", @@ -168,11 +161,20 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion $scope.eventDur = Math.round(edur); $scope.loginData = ZMDataModel.getLogin(); $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; - $scope.modal.show(); + + $ionicModal.fromTemplateUrl('templates/events-modal.html', { + scope: $scope, + animation: 'slide-in-up' + }) + .then(function (modal) { + $scope.modal = modal; + $scope.modal.show(); + }); + }; $scope.closeModal = function () { - console.log("Close Modal"); - $scope.modal.hide(); + console.log("Close & Destroy Modal"); + $scope.modal.remove(); }; //Cleanup the modal when we're done with it! -- cgit v1.2.3