summaryrefslogtreecommitdiff
path: root/www/js/MontageCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@users.noreply.github.com>2016-10-12 10:56:11 -0400
committerGitHub <noreply@github.com>2016-10-12 10:56:11 -0400
commita3d4132cc177a8009ba53630808abaa245bbaf79 (patch)
treeec891a02273110c34efb5a6f15158fc634d85f4e /www/js/MontageCtrl.js
parent986006947c3a6ac404d6868c113a03aaf202dcc2 (diff)
parent77670b3180515076ba19febd0cdff4d7ecb4da69 (diff)
Merge pull request #349 from pliablepixels/montage-jazz
Montage jazz Former-commit-id: ba1be6c70c55a7274d980d9b418b8bc385704ba2
Diffstat (limited to 'www/js/MontageCtrl.js')
-rw-r--r--www/js/MontageCtrl.js41
1 files changed, 24 insertions, 17 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 6910f148..1e13dd80 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -162,14 +162,16 @@ angular.module('zmApp.controllers')
imagesLoaded(elem).on('progress', function (instance, img) {
progressCalled = true;
+
// if (layouttype) $timeout (function(){layout(pckry);},100);
});
imagesLoaded(elem).on('always', function () {
//console.log ("******** ALL IMAGES LOADED");
+ // $scope.$digest();
NVRDataModel.debug("All images loaded");
-
+ $scope.areImagesLoading = false;
$ionicLoading.hide();
@@ -182,15 +184,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,20 +218,25 @@ 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 () {
- pckry.layout();},300);
-
+ $timeout(function () {
+ NVRDataModel.log("Force calling resize");
+ pckry.shiftLayout();
+ }, zm.packeryTimer); // don't ask
+ pckry.onresize();
}, zm.packeryTimer);
});
+
+
function itemDragged(item) {
NVRDataModel.debug("drag complete");
@@ -512,7 +517,8 @@ angular.module('zmApp.controllers')
disableBack: true
});
$state.go("events", {
- "id": 0
+ "id": 0,
+ "playEvent":false
}, {
reload: true
});
@@ -535,7 +541,8 @@ angular.module('zmApp.controllers')
disableBack: true
});
$state.go("events", {
- "id": 0
+ "id": 0,
+ "playEvent":false
}, {
reload: true
});