diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 3ea8358..28ffb84 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1343,23 +1343,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo img.src = src; - if (isMaskImage == 'N') { - $scope.MCounter++; + //if (isMaskImage == 'N') { + // $scope.MCounter++; + + + // $scope.ColoredImageSRC.push( + // { + // "bodyRegionId": bodyRegionId, "SRC": src, + // "Height": h, + // "Width": w, + // "x": x, + // "y": y, + // "haveMirror": 'true' + // } + // ); + // console.log('$scope.ColoredImageSRC.length inside flipped = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); - - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'true' - } - ); - console.log('$scope.ColoredImageSRC.length inside flipped = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); - - } + //} function start() { @@ -1374,16 +1374,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$scope.MCounter++; - //$scope.ColoredImageSRC.push( - // { - // "bodyRegionId": bodyRegionId, "SRC": src, - // "Height": h, - // "Width": w, - // "x": x, - // "y": y, - // "haveMirror": 'true' - // } - // ); + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'true' + } + ); //console.log('$scope.ColoredImageSRC.length inside flipped = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) @@ -1710,113 +1710,113 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo img.src = src; - if (isMaskImage == 'N') { - if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { - //do nothing - } - else { - $scope.counter++; + //if (isMaskImage == 'N') { + // if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { + // //do nothing + // } + // else { + // $scope.counter++; - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'false' - } + // $scope.ColoredImageSRC.push( + // { + // "bodyRegionId": bodyRegionId, "SRC": src, + // "Height": h, + // "Width": w, + // "x": x, + // "y": y, + // "haveMirror": 'false' + // } - ); - console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); - } - } + // ); + // console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); + // } + //} function start() { context.drawImage(img, 0, 0); if (isMaskImage == 'N') { - //if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { - // //do nothing - //} - //else { - // $scope.counter++; + if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { + //do nothing + } + else { + $scope.counter++; - // $scope.ColoredImageSRC.push( - // { - // "bodyRegionId": bodyRegionId, "SRC": src, - // "Height": h, - // "Width": w, - // "x": x, - // "y": y, - // "haveMirror": 'false' - // } + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'false' + } - // ); - // console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); + ); + // console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { - $scope.isEligibleForHighlight = true; - } - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) { - $scope.isEligibleForHighlight = true; - } - else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) { - $scope.isEligibleForHighlight = true; - } - else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { - $scope.isEligibleForHighlight = true; - } - else { - $scope.isEligibleForHighlight = false; - } + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { + $scope.isEligibleForHighlight = true; + } + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) { + $scope.isEligibleForHighlight = true; + } + else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) { + $scope.isEligibleForHighlight = true; + } + else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { + $scope.isEligibleForHighlight = true; + } + else { + $scope.isEligibleForHighlight = false; + } - if ($scope.isEligibleForHighlight == true) { + if ($scope.isEligibleForHighlight == true) { - //set scroll position - if ($scope.isLayerChange) { - console.log('$scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) + //set scroll position + if ($scope.isLayerChange) { + console.log('$scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) - var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; + var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; - if (isiOSSafari) { - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); + if (isiOSSafari) { + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); + } + else { + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) + } + // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) } - else { - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) - } - // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) - $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) - } + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { - - $rootScope.isLoading = false; - $('#spinner').css('visibility', 'hidden'); + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); - $rootScope.isLoading = true; - $('#spinner').css('visibility', 'visible'); - //$timeout(function () { - // console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) - $rootScope.isHighLight = true; - //console.log('just before highLightBody call'); - $scope.highLightBody(); - //console.log('just after highLightBody call'); - //}, 500); + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + //$timeout(function () { + // console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) + $rootScope.isHighLight = true; + //console.log('just before highLightBody call'); + $scope.highLightBody(); + //console.log('just after highLightBody call'); + //}, 500); + } } } - } + } } @@ -2430,7 +2430,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var canvasDiv = document.getElementById('canvasDiv'); $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; - // console.log('LAYERCHANGE $scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) + console.log('LAYERCHANGE $scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) $scope.flushCanvas();