diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-02-07 04:51:12 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-02-07 04:51:12 -0500 |
| commit | 50d385c41ea66b2dabbc8568d0e063f6cb1bc58d (patch) | |
| tree | 12fffb1bd85decc5577fc7281ae9b94030cc9f6c /www | |
| parent | e4d0eacbb481ab64960f2fe9f93cc537bd38b699 (diff) | |
reflow without changing size #448
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageCtrl.js | 26 | ||||
| -rw-r--r-- | www/templates/montage.html | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 43c72b4c..5171e705 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -1668,6 +1668,32 @@ angular.module('zmApp.controllers') pckry.shiftLayout(); } + + $scope.squeezeMonitors = function() + { + pckry.once('layoutComplete', resizeComplete); + $timeout (function() {pckry.layout();}); + + function resizeComplete() + { + //console.log ("HERE"); + $timeout(function() + { + var positions = pckry.getShiftPositions('data-item-id'); + console.log("SAVING"); + var ld = NVRDataModel.getLogin(); + + ld.packeryPositions = JSON.stringify(positions); + //console.log ("Saving " + ld.packeryPositions); + NVRDataModel.setLogin(ld); + $ionicLoading.hide(); + $scope.sliderChanging = false; + }, 20); + + } + + + }; //--------------------------------------------------------- // slider is tied to the view slider for montage //Remember not to use a variable. I'm using an object diff --git a/www/templates/montage.html b/www/templates/montage.html index 7622e45d..4c171060 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -36,6 +36,9 @@ <li> <a href="" ng-click="sliderChanged(-1)"> <i class="ion-minus-circled"></i></a> </li> + <li> + <a href="" ng-click="squeezeMonitors()"> <i class="ion-android-apps"></i></a> + </li> <li ng-if="!isDragabillyOn"> <a href="" ng-click="toggleCycle()"> <i class="ion-android-bicycle"></i>:{{getCycleStatus()}}</a> |
