From f2ef2c5d4eac539db86a5f0dbacad9e1bd205ba5 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Thu, 10 Sep 2015 08:20:44 +0100 Subject: You can now modify frame change delay - to take control in spotty/slow network conditions --- www/js/ModalCtrl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'www/js/ModalCtrl.js') diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index 3cb2787d..64fdc523 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -172,11 +172,12 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco }, ]}; + $interval.cancel(intervalModalHandle); intervalModalHandle= $interval(function () { loadModalNotifications(); // console.log ("Refreshing Image..."); - }.bind(this), 1000); + }.bind(this), ld.refreshSec * 1000); loadModalNotifications(); @@ -202,7 +203,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco intervalModalHandle= $interval(function () { loadModalNotifications(); // console.log ("Refreshing Image..."); - }.bind(this), 1000); + }.bind(this), ld.refreshSec*1000); $rootScope.modalRand = Math.floor((Math.random() * 100000) + 1); -- cgit v1.2.3