diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-18 13:43:24 -0700 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-18 13:43:24 -0700 |
| commit | d4b661cd78db1b7cdc2b7174f8f254b4f5605a9c (patch) | |
| tree | bb9ecff8994681f3bd17e497c47f25e2206b573f /www/js/MontageCtrl.js | |
| parent | 6c3c2a2d3396b5ba85efcc47bb44ac59ff5cd325 (diff) | |
#353 - inital code (also requires ZM API patch) to support local and server timezones
Former-commit-id: bbee60cc64cb521c0f7d7fc75437a9f427c58b5a
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 6b3eedb8..735631af 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -200,6 +200,7 @@ angular.module('zmApp.controllers') pckry.getItemElements().forEach(function (itemElem) { draggie = new Draggabilly(itemElem); + draggie = new Draggabilly(itemElem); pckry.bindDraggabillyEvents(draggie); draggies.push(draggie); draggie.disable(); @@ -226,10 +227,8 @@ angular.module('zmApp.controllers') NVRDataModel.debug("All images loaded, doing image layout"); - $timeout(function () { - pckry.initShiftLayout(positions, 'data-item-id'); - //$scope.$digest(); - }, 0); + + } $timeout(function () { NVRDataModel.log("Force calling resize"); @@ -386,7 +385,7 @@ angular.module('zmApp.controllers') return; } - if (pckry && !$scope.isDragabillyOn) pckry.shiftLayout(); + //if (pckry && !$scope.isDragabillyOn) pckry.shiftLayout(); $rootScope.rand = Math.floor((Math.random() * 100000) + 1); // if you see the time move, montage should move @@ -844,11 +843,17 @@ angular.module('zmApp.controllers') function orientationChanged() { - NVRDataModel.debug("Detected orientation change, redoing packery resize"); + /* NVRDataModel.debug("Detected orientation change, redoing packery resize"); $timeout(function () { if (pckry) pckry.onresize(); - }, zm.packeryTimer); + }, zm.packeryTimer);*/ $ionicScrollDelegate.$getByHandle("montage-delegate").scrollTop(); + var positions = pckry.getShiftPositions('data-item-id'); + //console.log ("POSITIONS MAP " + JSON.stringify(positions)); + var ld = NVRDataModel.getLogin(); + ld.packeryPositions = JSON.stringify(positions); + //console.log ("Saving " + ld.packeryPositions); + NVRDataModel.setLogin(ld); } $scope.toggleSizeButtons = function () { |
