Skip to content

Commit

Permalink
docupdates
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Jun 27, 2021
1 parent 42d72ab commit 25056e7
Showing 1 changed file with 33 additions and 24 deletions.
57 changes: 33 additions & 24 deletions www/js/MontageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,32 +859,41 @@ angular.module('zmApp.controllers')
NVR.setLogin(ld);
$scope.modal.remove();
$scope.MontageMonitors = $scope.copyMontage;
NVR.setMonitors($scope.MontageMonitors);
// let's wait for the changes to reflect in DOM
$timeout(function() {

var x = 0;
for (var i=0; i < $scope.MontageMonitors.length; i++) {
var display= $scope.MontageMonitors[i].Monitor.listDisplay;
var id=$scope.MontageMonitors[i].Monitor.Id;
for (var j=0; j < beforeReorderPositions.length; j++) {
beforeReorderPositions[j].x = x;
beforeReorderPositions[j].y = 0;
x = (x==0)?0.5:0;
if (beforeReorderPositions[j].attr == id) {
beforeReorderPositions[j].display = display;
break;
}
} // before reorder array
} // montage monitors


ld.packeryPositions = JSON.stringify(beforeReorderPositions);
ld.currentMontageProfile='';
NVR.debug ('Updating positions:'+JSON.stringify(ld.packeryPositions));
//ld.currentMontageProfile = "__reorder__";
$scope.currentProfileName = $translate.instant('kMontage');
$timeout ( function () {
NVR.setLogin(ld)
.then (function() {
finishReorder(false);
});
},100);

for (var i=0; i < $scope.MontageMonitors.length; i++) {
var display= $scope.MontageMonitors[i].Monitor.listDisplay;
var id=$scope.MontageMonitors[i].Monitor.Id;
for (var j=0; j < beforeReorderPositions.length; j++) {
if (beforeReorderPositions[j].attr == id) {
beforeReorderPositions[j].display = display;
break;
}
} // before reorder array
} // montage monitors

//console.log ($scope.copyMontage);
// call finish reorder after modal is gone
ld.packeryPositions = undefined;
ld.currentMontageProfile='';
NVR.debug ('Updating positions:'+JSON.stringify(ld.packeryPositions));
//console.log ("Savtogging " + ld.packeryPositions);
//ld.currentMontageProfile = "__reorder__";
$scope.currentProfileName = $translate.instant('kMontage');
$timeout ( function () {
NVR.setLogin(ld)
.then (function() {
finishReorder(false);
});
},300);



};

Expand Down

0 comments on commit 25056e7

Please sign in to comment.