Commit 388b8aeb64b71c95eb81e9d6df122f56efb2a54b
1 parent
0ded53f9
reverted code of browser crash issue because it craeted black issue in search as…
… the push in array executed and the draw was not done.
Showing
1 changed file
with
105 additions
and
105 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1343,23 +1343,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1343 | 1343 | |
1344 | 1344 | img.src = src; |
1345 | 1345 | |
1346 | - if (isMaskImage == 'N') { | |
1347 | - $scope.MCounter++; | |
1346 | + //if (isMaskImage == 'N') { | |
1347 | + // $scope.MCounter++; | |
1348 | + | |
1349 | + | |
1350 | + // $scope.ColoredImageSRC.push( | |
1351 | + // { | |
1352 | + // "bodyRegionId": bodyRegionId, "SRC": src, | |
1353 | + // "Height": h, | |
1354 | + // "Width": w, | |
1355 | + // "x": x, | |
1356 | + // "y": y, | |
1357 | + // "haveMirror": 'true' | |
1358 | + // } | |
1359 | + // ); | |
1360 | + // console.log('$scope.ColoredImageSRC.length inside flipped = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); | |
1348 | 1361 | |
1349 | - | |
1350 | - $scope.ColoredImageSRC.push( | |
1351 | - { | |
1352 | - "bodyRegionId": bodyRegionId, "SRC": src, | |
1353 | - "Height": h, | |
1354 | - "Width": w, | |
1355 | - "x": x, | |
1356 | - "y": y, | |
1357 | - "haveMirror": 'true' | |
1358 | - } | |
1359 | - ); | |
1360 | - console.log('$scope.ColoredImageSRC.length inside flipped = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); | |
1361 | - | |
1362 | - } | |
1362 | + //} | |
1363 | 1363 | |
1364 | 1364 | function start() { |
1365 | 1365 | |
... | ... | @@ -1374,16 +1374,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1374 | 1374 | //$scope.MCounter++; |
1375 | 1375 | |
1376 | 1376 | |
1377 | - //$scope.ColoredImageSRC.push( | |
1378 | - // { | |
1379 | - // "bodyRegionId": bodyRegionId, "SRC": src, | |
1380 | - // "Height": h, | |
1381 | - // "Width": w, | |
1382 | - // "x": x, | |
1383 | - // "y": y, | |
1384 | - // "haveMirror": 'true' | |
1385 | - // } | |
1386 | - // ); | |
1377 | + $scope.ColoredImageSRC.push( | |
1378 | + { | |
1379 | + "bodyRegionId": bodyRegionId, "SRC": src, | |
1380 | + "Height": h, | |
1381 | + "Width": w, | |
1382 | + "x": x, | |
1383 | + "y": y, | |
1384 | + "haveMirror": 'true' | |
1385 | + } | |
1386 | + ); | |
1387 | 1387 | //console.log('$scope.ColoredImageSRC.length inside flipped = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); |
1388 | 1388 | |
1389 | 1389 | // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) |
... | ... | @@ -1710,113 +1710,113 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1710 | 1710 | |
1711 | 1711 | img.src = src; |
1712 | 1712 | |
1713 | - if (isMaskImage == 'N') { | |
1714 | - if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { | |
1715 | - //do nothing | |
1716 | - } | |
1717 | - else { | |
1718 | - $scope.counter++; | |
1713 | + //if (isMaskImage == 'N') { | |
1714 | + // if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { | |
1715 | + // //do nothing | |
1716 | + // } | |
1717 | + // else { | |
1718 | + // $scope.counter++; | |
1719 | 1719 | |
1720 | 1720 | |
1721 | 1721 | |
1722 | - $scope.ColoredImageSRC.push( | |
1723 | - { | |
1724 | - "bodyRegionId": bodyRegionId, "SRC": src, | |
1725 | - "Height": h, | |
1726 | - "Width": w, | |
1727 | - "x": x, | |
1728 | - "y": y, | |
1729 | - "haveMirror": 'false' | |
1730 | - } | |
1722 | + // $scope.ColoredImageSRC.push( | |
1723 | + // { | |
1724 | + // "bodyRegionId": bodyRegionId, "SRC": src, | |
1725 | + // "Height": h, | |
1726 | + // "Width": w, | |
1727 | + // "x": x, | |
1728 | + // "y": y, | |
1729 | + // "haveMirror": 'false' | |
1730 | + // } | |
1731 | 1731 | |
1732 | - ); | |
1733 | - console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); | |
1734 | - } | |
1735 | - } | |
1732 | + // ); | |
1733 | + // console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); | |
1734 | + // } | |
1735 | + //} | |
1736 | 1736 | |
1737 | 1737 | function start() { |
1738 | 1738 | |
1739 | 1739 | context.drawImage(img, 0, 0); |
1740 | 1740 | |
1741 | 1741 | if (isMaskImage == 'N') { |
1742 | - //if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { | |
1743 | - // //do nothing | |
1744 | - //} | |
1745 | - //else { | |
1746 | - // $scope.counter++; | |
1742 | + if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { | |
1743 | + //do nothing | |
1744 | + } | |
1745 | + else { | |
1746 | + $scope.counter++; | |
1747 | 1747 | |
1748 | 1748 | |
1749 | 1749 | |
1750 | - // $scope.ColoredImageSRC.push( | |
1751 | - // { | |
1752 | - // "bodyRegionId": bodyRegionId, "SRC": src, | |
1753 | - // "Height": h, | |
1754 | - // "Width": w, | |
1755 | - // "x": x, | |
1756 | - // "y": y, | |
1757 | - // "haveMirror": 'false' | |
1758 | - // } | |
1750 | + $scope.ColoredImageSRC.push( | |
1751 | + { | |
1752 | + "bodyRegionId": bodyRegionId, "SRC": src, | |
1753 | + "Height": h, | |
1754 | + "Width": w, | |
1755 | + "x": x, | |
1756 | + "y": y, | |
1757 | + "haveMirror": 'false' | |
1758 | + } | |
1759 | 1759 | |
1760 | - // ); | |
1761 | - // console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); | |
1760 | + ); | |
1761 | + // console.log('$scope.ColoredImageSRC.length inside normal = ' + $scope.ColoredImageSRC.length + ', for $scope.layerNumber= ' + $scope.layerNumber); | |
1762 | 1762 | |
1763 | - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { | |
1763 | + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { | |
1764 | 1764 | |
1765 | - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { | |
1766 | - $scope.isEligibleForHighlight = true; | |
1767 | - } | |
1768 | - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) { | |
1769 | - $scope.isEligibleForHighlight = true; | |
1770 | - } | |
1771 | - else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) { | |
1772 | - $scope.isEligibleForHighlight = true; | |
1773 | - } | |
1774 | - else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { | |
1775 | - $scope.isEligibleForHighlight = true; | |
1776 | - } | |
1777 | - else { | |
1778 | - $scope.isEligibleForHighlight = false; | |
1779 | - } | |
1765 | + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { | |
1766 | + $scope.isEligibleForHighlight = true; | |
1767 | + } | |
1768 | + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) { | |
1769 | + $scope.isEligibleForHighlight = true; | |
1770 | + } | |
1771 | + else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) { | |
1772 | + $scope.isEligibleForHighlight = true; | |
1773 | + } | |
1774 | + else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { | |
1775 | + $scope.isEligibleForHighlight = true; | |
1776 | + } | |
1777 | + else { | |
1778 | + $scope.isEligibleForHighlight = false; | |
1779 | + } | |
1780 | 1780 | |
1781 | - if ($scope.isEligibleForHighlight == true) { | |
1781 | + if ($scope.isEligibleForHighlight == true) { | |
1782 | 1782 | |
1783 | - //set scroll position | |
1784 | - if ($scope.isLayerChange) { | |
1785 | - console.log('$scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) | |
1783 | + //set scroll position | |
1784 | + if ($scope.isLayerChange) { | |
1785 | + console.log('$scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) | |
1786 | 1786 | |
1787 | - var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; | |
1787 | + var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; | |
1788 | 1788 | |
1789 | - if (isiOSSafari) { | |
1790 | - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); | |
1789 | + if (isiOSSafari) { | |
1790 | + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); | |
1791 | 1791 | |
1792 | + } | |
1793 | + else { | |
1794 | + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) | |
1795 | + } | |
1796 | + // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) | |
1797 | + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) | |
1792 | 1798 | } |
1793 | - else { | |
1794 | - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) | |
1795 | - } | |
1796 | - // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) | |
1797 | - $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) | |
1798 | - } | |
1799 | + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1799 | 1800 | |
1800 | - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1801 | - | |
1802 | - $rootScope.isLoading = false; | |
1803 | - $('#spinner').css('visibility', 'hidden'); | |
1801 | + $rootScope.isLoading = false; | |
1802 | + $('#spinner').css('visibility', 'hidden'); | |
1804 | 1803 | |
1805 | 1804 | |
1806 | - $rootScope.isLoading = true; | |
1807 | - $('#spinner').css('visibility', 'visible'); | |
1808 | - //$timeout(function () { | |
1809 | - // console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1810 | - $rootScope.isHighLight = true; | |
1811 | - //console.log('just before highLightBody call'); | |
1812 | - $scope.highLightBody(); | |
1813 | - //console.log('just after highLightBody call'); | |
1814 | - //}, 500); | |
1805 | + $rootScope.isLoading = true; | |
1806 | + $('#spinner').css('visibility', 'visible'); | |
1807 | + //$timeout(function () { | |
1808 | + // console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1809 | + $rootScope.isHighLight = true; | |
1810 | + //console.log('just before highLightBody call'); | |
1811 | + $scope.highLightBody(); | |
1812 | + //console.log('just after highLightBody call'); | |
1813 | + //}, 500); | |
1814 | + } | |
1815 | 1815 | } |
1816 | 1816 | } |
1817 | - } | |
1818 | 1817 | |
1819 | 1818 | |
1819 | + } | |
1820 | 1820 | } |
1821 | 1821 | |
1822 | 1822 | |
... | ... | @@ -2430,7 +2430,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2430 | 2430 | var canvasDiv = document.getElementById('canvasDiv'); |
2431 | 2431 | $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; |
2432 | 2432 | $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; |
2433 | - // console.log('LAYERCHANGE $scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) | |
2433 | + console.log('LAYERCHANGE $scope.imageHorizontlScrollPosition = ' + $scope.imageHorizontlScrollPosition + ' and $scope.imageVerticalScrollPosition = ' + $scope.imageVerticalScrollPosition) | |
2434 | 2434 | |
2435 | 2435 | |
2436 | 2436 | $scope.flushCanvas(); | ... | ... |