summaryrefslogtreecommitdiff
path: root/www/js/MontageCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-10-11 12:32:45 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-10-11 12:32:45 -0400
commit07654b2eaaba4890cbbc45dec70e5995fd36a655 (patch)
tree3378df7035e5a00524ebf7ff7239daccdc25b700 /www/js/MontageCtrl.js
parentf9e03227e62d7f6c5c0cc381a897888c5efc3759 (diff)
cleanup and fixes to montage history
Former-commit-id: 440b7c8a70e4085afcdc7ed8e9b14eb979198177
Diffstat (limited to 'www/js/MontageCtrl.js')
-rw-r--r--www/js/MontageCtrl.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 6b48897d..0681d832 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -169,7 +169,7 @@ angular.module('zmApp.controllers')
imagesLoaded(elem).on('always', function () {
//console.log ("******** ALL IMAGES LOADED");
NVRDataModel.debug("All images loaded");
-
+ $scope.areImagesLoading = false;
$ionicLoading.hide();
@@ -182,15 +182,13 @@ angular.module('zmApp.controllers')
});
if (!progressCalled) {
- NVRDataModel.log("*** BUG PROGRESS WAS NOT CALLED");
+ NVRDataModel.log("*** PROGRESS WAS NOT CALLED");
+ pckry.reloadItems();
}
- NVRDataModel.debug("All images loaded, doing image layout");
- $scope.areImagesLoading = false; // outside timeout so images show before next line
- $timeout(function () {
- pckry.initShiftLayout(positions, 'data-item-id');
- //pckry.reloadItems();
+
-
+ $timeout(function () {
+
pckry.getItemElements().forEach(function (itemElem) {
draggie = new Draggabilly(itemElem);
pckry.bindDraggabillyEvents(draggie);
@@ -218,13 +216,15 @@ angular.module('zmApp.controllers')
}
-
+ NVRDataModel.debug("All images loaded, doing image layout");
+ $timeout(function () {
+ pckry.initShiftLayout(positions, 'data-item-id');
+ }, 0);
}
-
-
- pckry.shiftLayout();
- $timeout (function () {
- pckry.shiftLayout();},300);
+ $timeout(function () {
+ NVRDataModel.log("Force calling resize");
+ pckry.shiftLayout();
+ }, zm.packeryTimer); // don't ask
@@ -232,6 +232,8 @@ angular.module('zmApp.controllers')
});
+
+
function itemDragged(item) {
NVRDataModel.debug("drag complete");