summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-03-20 08:21:49 -0400
committerpliablepixels <pliablepixels@gmail.com>2016-03-20 08:21:49 -0400
commite885fa3ed2cdb1ce0c7b108df168decedc1525b3 (patch)
treeec374d0a3ce3a1ff395967aa167d56b962ee30d0
parentcf953db5386051f2c603c85867f6510cd0870b06 (diff)
fixed keyboard plugin, tweaking packery - seems calling resize helps
Former-commit-id: 711388615e23416b3956058b7f15909355b7a3ff
-rw-r--r--package.json5
-rw-r--r--www/js/MonitorCtrl.js1
-rw-r--r--www/js/MontageCtrl.js23
-rw-r--r--www/js/app.js2
-rw-r--r--www/templates/montage.html4
5 files changed, 23 insertions, 12 deletions
diff --git a/package.json b/package.json
index 79d864b1..6064eb22 100644
--- a/package.json
+++ b/package.json
@@ -77,11 +77,6 @@
"cordovaPlatforms": [
"ios",
{
- "platform": "ios",
- "version": "",
- "locator": "ios"
- },
- {
"platform": "android_temp",
"version": "",
"locator": "android_temp"
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index a217a462..fcd11b32 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -275,6 +275,7 @@ angular.module('zmApp.controllers')
// console.log("**VIEW ** Monitor Ctrl Entered");
ZMDataModel.setAwake(false);
$ionicSideMenuDelegate.canDragContent(true);
+ $scope.areImagesLoading = true;
});
$scope.$on('$ionicView.leave', function () {
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 920571dc..441bbfe3 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -252,6 +252,7 @@ function initPackery()
ZMDataModel.zmDebug ("All images loaded");
$ionicLoading.hide();
+
if (!progressCalled)
{
ZMDataModel.zmLog ("*** BUG PROGRESS WAS NOT CALLED");
@@ -287,9 +288,18 @@ function initPackery()
//console.log ("Index:"+positions[j].attr+ " with size: " + positions[j].size);
}
}
+
+
$timeout(function(){ZMDataModel.zmDebug ("All images loaded, doing image layout");pckry.initShiftLayout(positions, 'data-item-id'); },100);
- $timeout(function(){ZMDataModel.zmDebug ("Re-doing layout again - to overcome odd layout...");pckry.initShiftLayout(positions, 'data-item-id'); },200);
+
+ $timeout(function(){ZMDataModel.zmLog ("Force calling resize"); pckry.onresize();},300);// don't ask
+
+
+ // $timeout(function(){ZMDataModel.zmDebug ("Re-doing layout again - to overcome odd layout...");pckry.initShiftLayout(positions, 'data-item-id'); },200);
//$grid.packery( 'initShiftLayout', initPositions, 'data-item-id' );
+
+
+
}
});
@@ -488,6 +498,9 @@ function initPackery()
{
var i;
$scope.isDragabillyOn = !$scope.isDragabillyOn;
+
+ $ionicSideMenuDelegate.canDragContent($scope.isDragabillyOn? false: true);
+
//$timeout(function(){pckry.reloadItems();},10);
ZMDataModel.zmDebug ("setting dragabilly to " + $scope.isDragabillyOn);
if ($scope.isDragabillyOn)
@@ -715,6 +728,7 @@ function initPackery()
$scope.$on('$ionicView.enter', function () {
+ //$scope.areImagesLoading = true;
var ld = ZMDataModel.getLogin();
//console.log("Setting Awake to " + ZMDataModel.getKeepAwake());
ZMDataModel.setAwake(ZMDataModel.getKeepAwake());
@@ -794,6 +808,7 @@ function initPackery()
$timeout (function()
{
+ pckry.reloadItems();
pckry.once( 'layoutComplete', function() {
console.log ("Layout complete");
@@ -805,9 +820,9 @@ function initPackery()
// $scope.slider.monsize = 2;
});
//layout(pckry);
- pckry.layout(); // force here - no shiftlayout
- $timeout(function(){pckry.layout(); },100);// don't ask
-
+ $timeout (function(){pckry.layout();}); // force here - no shiftlayout
+
+
},100);
};
diff --git a/www/js/app.js b/www/js/app.js
index 5b221c93..a471ffe4 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -1294,7 +1294,7 @@ angular.module('zmApp', [
//cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
// solves screen bouncing on form input
// since I am using JS Scroll
- cordova.plugins.Keyboard.disableScroll(true);
+ //cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
diff --git a/www/templates/montage.html b/www/templates/montage.html
index 9d2837a5..2b3667a1 100644
--- a/www/templates/montage.html
+++ b/www/templates/montage.html
@@ -44,7 +44,7 @@
<div class="grid-item grid-item-{{monitor.Monitor.gridScale}} {{dragBorder}}" data-item-id="{{monitor.Monitor.Id}}" data-item-size="{{monitor.Monitor.gridScale}}" data-item-listdisplay="{{monitor.Monitor.listDisplay}}" >
<figure>
<div ng-if="!isModalActive" >
- <div ng-if="$root.authSession!='undefined' && !isBackground()">
+ <div ng-if="$root.authSession!='undefined' && !isBackground() && !areImagesLoading">
<div ng-if = "!minimal">
<div>
<img class="{{monitor.Monitor.selectStyle}}" id="img-{{$index}}" image-spinner-src="{{LoginData.streamingurl}}/nph-zms?mode=single&monitor={{monitor.Monitor.Id}}&scale={{LoginData.montageQuality}}{{$root.authSession}}&rand={{$root.rand}}" ng-click="!isDragabillyOn?openModal(monitor.Monitor.Id, monitor.Monitor.Controllable, monitor.Monitor.ControlId, monitor.Monitor.connKey):toggleSelectItem($index);" image-spinner-loader="lines" on-swipe-up="swipeUp()" on-swipe-down="swipeDown()" />
@@ -60,7 +60,7 @@
</div>
</div>
- <div ng-if="!$root.authSession=='undefined' || isBackground()">
+ <div ng-if="!$root.authSession=='undefined' || isBackground() || areImagesLoading">
<img image-spinner-src="img/pausevideo.png" />
</div>