diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 47a8876..17db0b3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -54,7 +54,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// $scope.AnteriorView = "active";
- $scope.zoomInOut = 75;
+ $rootScope.zoomInOut = 75;
$scope.speechBubbleCounter = 0;
$scope.j = 0;
$scope.speechbubbleList = [];
@@ -251,7 +251,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage;
+ $scope.imagePath = "~/../content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage;
var $el = $('
'
@@ -962,6 +962,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
+ if (localStorage.getItem("zoomInOutValue")!=undefined)
+ $rootScope.zoomInOut = localStorage.getItem("zoomInOutValue");
+
if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) {
angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
@@ -1096,7 +1099,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
- var src = "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
+ var src = "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
$scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N')
@@ -1193,7 +1196,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
function scaleRectangle(x, y, height, width, mirrorValue) {
- var nzoom = $scope.zoomInOut;
+ var nzoom = $rootScope.zoomInOut;
var existingZoon = 100;
var X = 0;
@@ -1282,7 +1285,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($rootScope.viewOrientationId == 3 && bodyRegionId == 1) {
console.log('$rootScope.voId: ' + $rootScope.voId);
if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') {
- return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
+ return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
}
}
@@ -1290,7 +1293,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) {
- return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
+ return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
}
}
}
@@ -1302,7 +1305,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) {
var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId;
- return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName;
+ return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName;
}
else // it is for other body view which have multiple body regions and layer no > 0
@@ -1313,7 +1316,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId;
if (bodyRegion == bodyRegionId) {
- return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
+ return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
}
@@ -1355,13 +1358,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
for (var z = 0; z <= $scope.bagartDetailsOnSktn.length; z++) {
var gender = $scope.bagartDetailsOnSktn[z]._Gender;
if (gender == selectedGender) {
- return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[z]._ImageId;
+ return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[z]._ImageId;
}
}
}
else {
- return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[0]._ImageId;
+ return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[0]._ImageId;
}
}
@@ -5976,23 +5979,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.flushCanvas();
- if ($scope.zoomInOut == 25) {
- $scope.zoomInOut = 75;
+ if ($rootScope.zoomInOut == 25) {
+ $rootScope.zoomInOut = 75;
}
else {
- $scope.zoomInOut = 25;
+ $rootScope.zoomInOut = 25;
}
-
+ localStorage.setItem("zoomInOutValue", $rootScope.zoomInOut);
//2.
$scope.CalculateImageCordinates($rootScope.viewOrientationId);
//3.
- if ($scope.zoomInOut == 25) {
+ if ($rootScope.zoomInOut == 25) {
if ($('#canvasDiv') != null)
$('#canvasDiv').scrollLeft(0)
@@ -8166,8 +8169,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
console.log('aligneCanvasWithTerm')
// debugger
- var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
- var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
+ var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA));
+ var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA));
var canvasX = parseInt(document.getElementById('canvasDiv').offsetLeft);
var canvasY = parseInt(document.getElementById('canvasDiv').offsetTop);