From 285df46e95eb1c59542bb7574fd48610b507b7e9 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Tue, 8 Mar 2016 15:38:20 -0500 Subject: #179 use layout and shiftLayout correctly after testing with Android Former-commit-id: 4075c63cddd99bd6237d98300002fa830f35ce15 --- www/js/MontageCtrl.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'www/js/MontageCtrl.js') diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index b3ca6927..f2fb72fd 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -745,10 +745,10 @@ function initPackery() else { $scope.MontageMonitors[i].Monitor.gridScale="20"; - somethingReset = true; + // somethingReset = true; } } - if (!somethingReset) // nothing was selected + if (!somethingReset && $scope.isDragabillyOn) // nothing was selected { for (i=0; i< $scope.MontageMonitors.length; i++){$scope.MontageMonitors[i].Monitor.gridScale="20";} } @@ -765,8 +765,9 @@ function initPackery() ZMDataModel.setLogin(ld); $scope.slider.monsize = 2; }); - layout(pckry); - $timeout(function(){layout(pckry); },100);// don't ask + //layout(pckry); + pckry.layout(); // force here - no shiftlayout + $timeout(function(){pckry.layout(); },100);// don't ask },100); @@ -819,12 +820,12 @@ function initPackery() else { $scope.MontageMonitors[i].Monitor.gridScale= curVal; - somethingReset = true; + //somethingReset = true; } } - if (!somethingReset) // nothing was selected + if (!somethingReset && $scope.isDragabillyOn) // nothing was selected { for (i=0; i< $scope.MontageMonitors.length; i++) { @@ -849,7 +850,10 @@ function initPackery() $ionicLoading.hide(); $scope.sliderChanging = false; }); - layout(pckry); + if (!somethingReset) + pckry.layout(); + else + layout(pckry); },100); -- cgit v1.2.3