From 50d385c41ea66b2dabbc8568d0e063f6cb1bc58d Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 7 Feb 2017 04:51:12 -0500 Subject: reflow without changing size #448 --- www/js/MontageCtrl.js | 26 ++++++++++++++++++++++++++ www/templates/montage.html | 3 +++ 2 files changed, 29 insertions(+) (limited to 'www') 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 @@
  • +
  • + +
  • :{{getCycleStatus()}} -- cgit v1.2.3