summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-10-17 16:07:40 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-10-17 16:07:40 -0400
commit6c3c2a2d3396b5ba85efcc47bb44ac59ff5cd325 (patch)
tree4915aff0d79396f3d40c0ba4cc8447c8fd8b4b16 /www
parent15923f58d87cb9a969511471be1f17219f000ff6 (diff)
flow in real tine
Former-commit-id: 04c71e98440ff32d8e1b5dcfd72ec91a1b10556f
Diffstat (limited to 'www')
-rw-r--r--www/external/angular-carousel.js30
-rw-r--r--www/js/MontageCtrl.js21
2 files changed, 28 insertions, 23 deletions
diff --git a/www/external/angular-carousel.js b/www/external/angular-carousel.js
index 1b65d32c..21cc6729 100644
--- a/www/external/angular-carousel.js
+++ b/www/external/angular-carousel.js
@@ -50,7 +50,9 @@ angular.module('angular-carousel')
//console.log ("Calling autoslide because isStopped is false");
scope.autoSlide();
}
- else {console.log ("Not sliding as stop=true");}
+ else {
+ //console.log ("Not sliding as stop=true");
+ }
};
//PP - don't auto play if user taps
var toggleAutoPlay = function() {
@@ -65,21 +67,21 @@ angular.module('angular-carousel')
//scope.rnForceStop = true; //PP
carouselUtils.setStop (true);
carouselUtils.setIndex (scope.carouselIndex);
- console.log ("***RN: Stopping Play rnForceStop is "+carouselUtils.getStop());
+ //console.log ("***RN: Stopping Play rnForceStop is "+carouselUtils.getStop());
stopAutoPlay();
}
else
{
//scope.rnForceStop = false; //PP
carouselUtils.setStop (false);
- console.log ("***RN: Starting Play rnForceStop is "+carouselUtils.getStop());
+ //console.log ("***RN: Starting Play rnForceStop is "+carouselUtils.getStop());
//scope.carouselIndex = carouselUtils.getIndex();
restartTimer();
}
};
// start with autoplay and require tap to stop
- console.log ("*** Setting rnForceStop to false and watching");
+ //console.log ("*** Setting rnForceStop to false and watching");
//scope.rnForceStop = false; // PP
carouselUtils.setStop (false);
scope.$watch('carouselIndex', restartTimer);
@@ -88,19 +90,19 @@ angular.module('angular-carousel')
// PP - added touchend to make it react to touch devices
if (attrs.hasOwnProperty('rnPlatform') && attrs.rnPlatform == 'desktop')
{
- console.log ("ranPlatform is " + attrs.rnPlatform);
- console.log ("Desktop, de-registering any old click");
+ //console.log ("ranPlatform is " + attrs.rnPlatform);
+ //console.log ("Desktop, de-registering any old click");
element.off('click', toggleAutoPlay); // PP - remove mouse click for desktop
element.on('click', toggleAutoPlay); // PP for desktop
- console.log ("Desktop, registering click");
+ //console.log ("Desktop, registering click");
}
else
{
- console.log ("ranPlatform is " + attrs.rnPlatform);
- console.log ("Device, de-registering any old touch");
+ //console.log ("ranPlatform is " + attrs.rnPlatform);
+ //console.log ("Device, de-registering any old touch");
element.off('touchend', toggleAutoPlay); // PP - remove touchend too
element.on('touchend', toggleAutoPlay);
- console.log ("Device, registering touch");
+ //console.log ("Device, registering touch");
}
//element.on('mouseenter', stopAutoPlay);
//element.on('mouseleave', restartTimer);
@@ -265,7 +267,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
setDuration: function (val)
{
duration = val;
- console.log (">>>>>>>>>>>>>>>> DURATION SET TO (secs) " + duration);
+ //console.log (">>>>>>>>>>>>>>>> DURATION SET TO (secs) " + duration);
},
getDuration: function ()
@@ -285,7 +287,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
setIndex: function(val)
{
stoppedIndex = val;
- console.log ("setting saved index to " + stoppedIndex);
+ //console.log ("setting saved index to " + stoppedIndex);
},
getIndex: function()
{
@@ -301,7 +303,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
},
hello: function()
{
- console.log ("Hello from carouselUtils");
+ //console.log ("Hello from carouselUtils");
}
}
@@ -453,7 +455,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
scope.nextSlide = function(slideOptions) {
if (carouselUtils.isStopped()==true)
{
- console.log ("Just updated index, but we are stopped");
+ //console.log ("Just updated index, but we are stopped");
return;
}
var index = scope.carouselIndex + 1;
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 4fcfe4d6..6b3eedb8 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -158,11 +158,22 @@ angular.module('zmApp.controllers')
var elem = angular.element(document.getElementById("mygrid"));
//console.log ("**** mygrid is " + JSON.stringify(elem));
+
+
+ pckry = new Packery('.grid', {
+ itemSelector: '.grid-item',
+ percentPosition: true,
+ columnWidth: '.grid-sizer',
+ gutter: 0,
+ initLayout: layouttype
+
+ });
imagesLoaded(elem).on('progress', function (instance, img) {
var result = img.isLoaded ? 'loaded' : 'broken';
NVRDataModel.debug( '~~loaded image is ' + result + ' for ' + img.img.src );
+ pckry.layout();
progressCalled = true;
@@ -179,14 +190,6 @@ angular.module('zmApp.controllers')
$ionicLoading.hide();
- pckry = new Packery('.grid', {
- itemSelector: '.grid-item',
- percentPosition: true,
- columnWidth: '.grid-sizer',
- gutter: 0,
- initLayout: layouttype
-
- });
if (!progressCalled) {
NVRDataModel.log("*** PROGRESS WAS NOT CALLED");
pckry.reloadItems();
@@ -844,7 +847,7 @@ angular.module('zmApp.controllers')
NVRDataModel.debug("Detected orientation change, redoing packery resize");
$timeout(function () {
if (pckry) pckry.onresize();
- });
+ }, zm.packeryTimer);
$ionicScrollDelegate.$getByHandle("montage-delegate").scrollTop();
}