Commit e6065c82794fcaccfcefd4cb68abc87927cf2d90
Merge branch 'Bug#15355_1' into Develop
Showing
1 changed file
with
20 additions
and
17 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -54,7 +54,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -54,7 +54,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
54 | 54 | ||
55 | // $scope.AnteriorView = "active"; | 55 | // $scope.AnteriorView = "active"; |
56 | 56 | ||
57 | - $scope.zoomInOut = 75; | 57 | + $rootScope.zoomInOut = 75; |
58 | $scope.speechBubbleCounter = 0; | 58 | $scope.speechBubbleCounter = 0; |
59 | $scope.j = 0; | 59 | $scope.j = 0; |
60 | $scope.speechbubbleList = []; | 60 | $scope.speechbubbleList = []; |
@@ -251,7 +251,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -251,7 +251,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
251 | 251 | ||
252 | } | 252 | } |
253 | 253 | ||
254 | - $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; | 254 | + $scope.imagePath = "~/../content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; |
255 | 255 | ||
256 | 256 | ||
257 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >' | 257 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >' |
@@ -968,6 +968,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -968,6 +968,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
968 | 968 | ||
969 | } | 969 | } |
970 | 970 | ||
971 | + if (localStorage.getItem("zoomInOutValue")!=undefined) | ||
972 | + $rootScope.zoomInOut = localStorage.getItem("zoomInOutValue"); | ||
973 | + | ||
971 | if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) { | 974 | if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) { |
972 | angular.forEach($scope.bodyRegionCoordinates, function (value, key) { | 975 | angular.forEach($scope.bodyRegionCoordinates, function (value, key) { |
973 | 976 | ||
@@ -1102,7 +1105,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1102,7 +1105,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1102 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); | 1105 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); |
1103 | 1106 | ||
1104 | 1107 | ||
1105 | - var src = "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName; | 1108 | + var src = "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName; |
1106 | 1109 | ||
1107 | $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N') | 1110 | $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N') |
1108 | 1111 | ||
@@ -1199,7 +1202,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1199,7 +1202,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1199 | } | 1202 | } |
1200 | 1203 | ||
1201 | function scaleRectangle(x, y, height, width, mirrorValue) { | 1204 | function scaleRectangle(x, y, height, width, mirrorValue) { |
1202 | - var nzoom = $scope.zoomInOut; | 1205 | + var nzoom = $rootScope.zoomInOut; |
1203 | var existingZoon = 100; | 1206 | var existingZoon = 100; |
1204 | 1207 | ||
1205 | var X = 0; | 1208 | var X = 0; |
@@ -1288,7 +1291,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1288,7 +1291,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1288 | if ($rootScope.viewOrientationId == 3 && bodyRegionId == 1) { | 1291 | if ($rootScope.viewOrientationId == 3 && bodyRegionId == 1) { |
1289 | console.log('$rootScope.voId: ' + $rootScope.voId); | 1292 | console.log('$rootScope.voId: ' + $rootScope.voId); |
1290 | if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') { | 1293 | if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') { |
1291 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | 1294 | + return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; |
1292 | } | 1295 | } |
1293 | } | 1296 | } |
1294 | 1297 | ||
@@ -1296,7 +1299,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1296,7 +1299,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1296 | 1299 | ||
1297 | if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | 1300 | if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { |
1298 | 1301 | ||
1299 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | 1302 | + return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; |
1300 | } | 1303 | } |
1301 | } | 1304 | } |
1302 | } | 1305 | } |
@@ -1308,7 +1311,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1308,7 +1311,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1308 | if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) { | 1311 | if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) { |
1309 | var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId; | 1312 | var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId; |
1310 | 1313 | ||
1311 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | 1314 | + return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; |
1312 | 1315 | ||
1313 | } | 1316 | } |
1314 | else // it is for other body view which have multiple body regions and layer no > 0 | 1317 | else // it is for other body view which have multiple body regions and layer no > 0 |
@@ -1319,7 +1322,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1319,7 +1322,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1319 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; | 1322 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; |
1320 | if (bodyRegion == bodyRegionId) { | 1323 | if (bodyRegion == bodyRegionId) { |
1321 | 1324 | ||
1322 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | 1325 | + return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; |
1323 | 1326 | ||
1324 | 1327 | ||
1325 | } | 1328 | } |
@@ -1361,13 +1364,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1361,13 +1364,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1361 | for (var z = 0; z <= $scope.bagartDetailsOnSktn.length; z++) { | 1364 | for (var z = 0; z <= $scope.bagartDetailsOnSktn.length; z++) { |
1362 | var gender = $scope.bagartDetailsOnSktn[z]._Gender; | 1365 | var gender = $scope.bagartDetailsOnSktn[z]._Gender; |
1363 | if (gender == selectedGender) { | 1366 | if (gender == selectedGender) { |
1364 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[z]._ImageId; | 1367 | + return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[z]._ImageId; |
1365 | } | 1368 | } |
1366 | } | 1369 | } |
1367 | } | 1370 | } |
1368 | 1371 | ||
1369 | else { | 1372 | else { |
1370 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[0]._ImageId; | 1373 | + return "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[0]._ImageId; |
1371 | 1374 | ||
1372 | } | 1375 | } |
1373 | } | 1376 | } |
@@ -5982,23 +5985,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5982,23 +5985,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5982 | 5985 | ||
5983 | $scope.flushCanvas(); | 5986 | $scope.flushCanvas(); |
5984 | 5987 | ||
5985 | - if ($scope.zoomInOut == 25) { | ||
5986 | - $scope.zoomInOut = 75; | 5988 | + if ($rootScope.zoomInOut == 25) { |
5989 | + $rootScope.zoomInOut = 75; | ||
5987 | 5990 | ||
5988 | } | 5991 | } |
5989 | else { | 5992 | else { |
5990 | - $scope.zoomInOut = 25; | 5993 | + $rootScope.zoomInOut = 25; |
5991 | 5994 | ||
5992 | 5995 | ||
5993 | } | 5996 | } |
5994 | - | 5997 | + localStorage.setItem("zoomInOutValue", $rootScope.zoomInOut); |
5995 | //2. | 5998 | //2. |
5996 | $scope.CalculateImageCordinates($rootScope.viewOrientationId); | 5999 | $scope.CalculateImageCordinates($rootScope.viewOrientationId); |
5997 | 6000 | ||
5998 | //3. | 6001 | //3. |
5999 | 6002 | ||
6000 | 6003 | ||
6001 | - if ($scope.zoomInOut == 25) { | 6004 | + if ($rootScope.zoomInOut == 25) { |
6002 | if ($('#canvasDiv') != null) | 6005 | if ($('#canvasDiv') != null) |
6003 | $('#canvasDiv').scrollLeft(0) | 6006 | $('#canvasDiv').scrollLeft(0) |
6004 | 6007 | ||
@@ -8172,8 +8175,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -8172,8 +8175,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
8172 | console.log('aligneCanvasWithTerm') | 8175 | console.log('aligneCanvasWithTerm') |
8173 | // debugger | 8176 | // debugger |
8174 | 8177 | ||
8175 | - var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); | ||
8176 | - var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); | 8178 | + var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA)); |
8179 | + var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA)); | ||
8177 | 8180 | ||
8178 | var canvasX = parseInt(document.getElementById('canvasDiv').offsetLeft); | 8181 | var canvasX = parseInt(document.getElementById('canvasDiv').offsetLeft); |
8179 | var canvasY = parseInt(document.getElementById('canvasDiv').offsetTop); | 8182 | var canvasY = parseInt(document.getElementById('canvasDiv').offsetTop); |