Commit f1ec92556e2e17e2cc818a47248043dbefef13a2
1 parent
b4e8bf4e
skintone setting issue is fixed. made layer number as rootscope variable.
Showing
1 changed file
with
25 additions
and
25 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -24,7 +24,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
24 | 24 | $scope.drawnBodyRegions; |
25 | 25 | //view specific constants |
26 | 26 | $rootScope.voId; |
27 | - $scope.layerNumber; | |
27 | + $rootScope.layerNumber; | |
28 | 28 | $scope.daCounter = 1; |
29 | 29 | $scope.bagartDetails; |
30 | 30 | $scope.transNumber = 50; |
... | ... | @@ -624,7 +624,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
624 | 624 | |
625 | 625 | $rootScope.isNormalMode = true; |
626 | 626 | |
627 | - $scope.layerNumber = 0; | |
627 | + $rootScope.layerNumber = 0; | |
628 | 628 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
629 | 629 | |
630 | 630 | $rootScope.viewOrientationId = $rootScope.voId; |
... | ... | @@ -840,7 +840,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
840 | 840 | |
841 | 841 | if ((dtlOfSktn != null || dtlOfSktn != undefined) && (dtlOfSktn.length > 0)) { |
842 | 842 | |
843 | - if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($scope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($scope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) { | |
843 | + if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($rootScope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($rootScope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) { | |
844 | 844 | $scope.figLaefImageName = dtlOfSktn[0]._ImageId; |
845 | 845 | //$scope.figLaefX = filtereddata[0]._X; |
846 | 846 | //$scope.figLaefY = filtereddata[0]._Y; |
... | ... | @@ -895,7 +895,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
895 | 895 | $('#canvasDiv').scrollTop(50) |
896 | 896 | var abc = $rootScope.BodyRegionCordinatesData; |
897 | 897 | //debugger; |
898 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
898 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($rootScope.layerNumber)); | |
899 | 899 | // $('#spinner').css('visibility', 'hidden'); |
900 | 900 | $rootScope.isLoading = false; |
901 | 901 | //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. |
... | ... | @@ -1001,19 +1001,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1001 | 1001 | // debugger |
1002 | 1002 | $('#txtLayerNumber').attr('max', $scope.totalLayers); |
1003 | 1003 | $('#layerChangeSlider').slider("option", "max", $scope.totalLayers); |
1004 | - // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($scope.layerNumber)); | |
1004 | + // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($rootScope.layerNumber)); | |
1005 | 1005 | |
1006 | 1006 | $scope.one = 1; |
1007 | 1007 | |
1008 | - $scope.userInput = parseInt($scope.layerNumber); | |
1008 | + $scope.userInput = parseInt($rootScope.layerNumber); | |
1009 | 1009 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
1010 | 1010 | |
1011 | 1011 | var SelectedLayerData = []; |
1012 | 1012 | SelectedLayerData = $rootScope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1]; |
1013 | 1013 | if ((SelectedLayerData != null || SelectedLayerData != undefined)) |
1014 | 1014 | |
1015 | - if ($scope.layerNumber == 0) { | |
1016 | - console.log('lNo: ' + $scope.layerNumber + ' and BodyRegion.length: ' + SelectedLayerData.BodyRegion.length); | |
1015 | + if ($rootScope.layerNumber == 0) { | |
1016 | + console.log('lNo: ' + $rootScope.layerNumber + ' and BodyRegion.length: ' + SelectedLayerData.BodyRegion.length); | |
1017 | 1017 | |
1018 | 1018 | if (SelectedLayerData.BodyRegion.length > 0) { |
1019 | 1019 | for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { |
... | ... | @@ -1024,7 +1024,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1024 | 1024 | if ($rootScope.viewOrientationId == 3 && bodyRegionId == 1) { |
1025 | 1025 | console.log('$rootScope.voId: ' + $rootScope.voId); |
1026 | 1026 | if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') { |
1027 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1027 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1028 | 1028 | } |
1029 | 1029 | } |
1030 | 1030 | |
... | ... | @@ -1032,7 +1032,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1032 | 1032 | |
1033 | 1033 | if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { |
1034 | 1034 | |
1035 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1035 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1036 | 1036 | } |
1037 | 1037 | } |
1038 | 1038 | } |
... | ... | @@ -1044,7 +1044,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1044 | 1044 | if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) { |
1045 | 1045 | var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId; |
1046 | 1046 | |
1047 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | |
1047 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | |
1048 | 1048 | |
1049 | 1049 | } |
1050 | 1050 | else // it is for other body view which have multiple body regions and layer no > 0 |
... | ... | @@ -1055,7 +1055,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1055 | 1055 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; |
1056 | 1056 | if (bodyRegion == bodyRegionId) { |
1057 | 1057 | |
1058 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1058 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1059 | 1059 | |
1060 | 1060 | |
1061 | 1061 | } |
... | ... | @@ -2402,7 +2402,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2402 | 2402 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { |
2403 | 2403 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); |
2404 | 2404 | // debugger; |
2405 | - $scope.layerNumber = parseInt(txtlayerNumber.value); | |
2405 | + $rootScope.layerNumber = parseInt(txtlayerNumber.value); | |
2406 | 2406 | |
2407 | 2407 | |
2408 | 2408 | $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false); |
... | ... | @@ -2418,7 +2418,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2418 | 2418 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { |
2419 | 2419 | $('#txtlayerNumber').val(dataLength - 1); |
2420 | 2420 | $scope.currentLayerNumber = parseInt(dataLength - 1); |
2421 | - $scope.layerNumber = parseInt(dataLength - 1); | |
2421 | + $rootScope.layerNumber = parseInt(dataLength - 1); | |
2422 | 2422 | } |
2423 | 2423 | else |
2424 | 2424 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); |
... | ... | @@ -2441,7 +2441,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2441 | 2441 | $timeout(function () { $scope.DisableProgressBar() }, 1000); |
2442 | 2442 | } |
2443 | 2443 | |
2444 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
2444 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($rootScope.layerNumber)); | |
2445 | 2445 | } |
2446 | 2446 | |
2447 | 2447 | $scope.DisableProgressBar = function () { |
... | ... | @@ -3669,14 +3669,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3669 | 3669 | } |
3670 | 3670 | else if (isLayerChanged) { |
3671 | 3671 | // debugger |
3672 | - $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | |
3672 | + $rootScope.layerNumber = parseInt($('#txtlayerNumber').val()); | |
3673 | 3673 | |
3674 | 3674 | } |
3675 | 3675 | else { |
3676 | 3676 | var currentLayer = parseInt($('#txtlayerNumber').val()); |
3677 | 3677 | |
3678 | 3678 | var tranparencyLayer = currentLayer + 1; |
3679 | - $scope.layerNumber = tranparencyLayer; | |
3679 | + $rootScope.layerNumber = tranparencyLayer; | |
3680 | 3680 | } |
3681 | 3681 | |
3682 | 3682 | //dedebugger; |
... | ... | @@ -3908,7 +3908,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3908 | 3908 | PreviousBodyRegionX = XforTransImage; |
3909 | 3909 | previousBodyRegionId = bodyRegionId; |
3910 | 3910 | |
3911 | - // $scope.layerNumber = parseInt($scope.layerNumber - 1); | |
3911 | + // $rootScope.layerNumber = parseInt($rootScope.layerNumber - 1); | |
3912 | 3912 | |
3913 | 3913 | } |
3914 | 3914 | |
... | ... | @@ -4407,7 +4407,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4407 | 4407 | } |
4408 | 4408 | //var scope = angular.element(document.getElementById("DAView")).scope(); |
4409 | 4409 | //scope.$apply(function () { |
4410 | - // $scope.layerNumber = 0; | |
4410 | + // $rootScope.layerNumber = 0; | |
4411 | 4411 | $scope.isTransparencyActivated = false; |
4412 | 4412 | //}) |
4413 | 4413 | |
... | ... | @@ -4421,7 +4421,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4421 | 4421 | |
4422 | 4422 | //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']")) |
4423 | 4423 | //.remove(); |
4424 | - $scope.layerNumber = $scope.currentLayerNumber; | |
4424 | + $rootScope.layerNumber = $scope.currentLayerNumber; | |
4425 | 4425 | $scope.transNumber = 50; |
4426 | 4426 | $(".slider").slider({ value: 50 }) |
4427 | 4427 | } |
... | ... | @@ -5356,7 +5356,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5356 | 5356 | $('#spinner').css('visibility', 'visible'); |
5357 | 5357 | |
5358 | 5358 | $rootScope.isViewChange = true; |
5359 | - $scope.layerNumber = 0; | |
5359 | + $rootScope.layerNumber = 0; | |
5360 | 5360 | // debugger; |
5361 | 5361 | var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; |
5362 | 5362 | $rootScope.viewOrientationId = selectedViewId; |
... | ... | @@ -5496,7 +5496,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5496 | 5496 | //console.log('reloadDABodyViewEvent'); |
5497 | 5497 | |
5498 | 5498 | $scope.ReloadBodyViewId = data.reloadDABodyViewId; |
5499 | - // $scope.layerNumber = 0; | |
5499 | + // $rootScope.layerNumber = 0; | |
5500 | 5500 | // debugger; |
5501 | 5501 | |
5502 | 5502 | console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); |
... | ... | @@ -6864,7 +6864,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6864 | 6864 | layerNumber = parseInt(layerNumber) - 1; |
6865 | 6865 | } |
6866 | 6866 | |
6867 | - $scope.layerNumber = layerNumber; | |
6867 | + $rootScope.layerNumber = layerNumber; | |
6868 | 6868 | |
6869 | 6869 | //4.get scroll position |
6870 | 6870 | if (actualTermNumber != DA[0].SKIN_TERM_ID) { |
... | ... | @@ -6905,8 +6905,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6905 | 6905 | } |
6906 | 6906 | } |
6907 | 6907 | |
6908 | - $('#txtlayerNumber').val((parseInt($scope.layerNumber))); | |
6909 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
6908 | + $('#txtlayerNumber').val((parseInt($rootScope.layerNumber))); | |
6909 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($rootScope.layerNumber)); | |
6910 | 6910 | |
6911 | 6911 | //8.remove current layer canavses |
6912 | 6912 | $scope.flushCanvas(); | ... | ... |