Commit e4e60855599e2f54cea2c3aaf882e936b61d5bbd
Merge branch 'Bug#7663' into Develop
Showing
1 changed file
with
44 additions
and
63 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -735,6 +735,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
735 | 735 | //calculate coordinates for body region images |
736 | 736 | $scope.CalculateImageCordinates = function (viewOrientationId) { |
737 | 737 | |
738 | + $rootScope.isLoading = true; | |
739 | + $('#spinner').css('visibility', 'visible'); | |
740 | + | |
738 | 741 | // annotation toolbar canvas |
739 | 742 | if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { |
740 | 743 | |
... | ... | @@ -744,6 +747,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
744 | 747 | |
745 | 748 | } |
746 | 749 | |
750 | + | |
751 | + | |
747 | 752 | $scope.terminateCurrentlyRunningWPs(); |
748 | 753 | |
749 | 754 | var drawnBodyRegionCount = []; |
... | ... | @@ -948,8 +953,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
948 | 953 | |
949 | 954 | }); |
950 | 955 | |
951 | - $rootScope.isLoading = false; | |
952 | - $('#spinner').css('visibility', 'hidden'); | |
956 | + //$rootScope.isLoading = false; | |
957 | + //$('#spinner').css('visibility', 'hidden'); | |
953 | 958 | } |
954 | 959 | |
955 | 960 | if (($rootScope.globalSetting.modesty == 'Y')) { |
... | ... | @@ -1205,6 +1210,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1205 | 1210 | |
1206 | 1211 | $scope.DrawMirroredImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) { |
1207 | 1212 | |
1213 | + $rootScope.isLoading = true; | |
1214 | + $('#spinner').css('visibility', 'visible'); | |
1215 | + | |
1208 | 1216 | var FlipedImgCanvas = document.createElement('canvas'); |
1209 | 1217 | FlipedImgCanvas.height = h; |
1210 | 1218 | FlipedImgCanvas.width = w; |
... | ... | @@ -1532,6 +1540,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1532 | 1540 | //}, 500); |
1533 | 1541 | } |
1534 | 1542 | } |
1543 | + else { | |
1544 | + $rootScope.isLoading = false; | |
1545 | + $('#spinner').css('visibility', 'hidden'); | |
1546 | + } | |
1535 | 1547 | } |
1536 | 1548 | |
1537 | 1549 | // console.log('ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length); |
... | ... | @@ -1564,6 +1576,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1564 | 1576 | |
1565 | 1577 | $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) { |
1566 | 1578 | |
1579 | + $rootScope.isLoading = true; | |
1580 | + $('#spinner').css('visibility', 'visible'); | |
1581 | + | |
1567 | 1582 | var imgCanvas = document.createElement('canvas'); |
1568 | 1583 | |
1569 | 1584 | imgCanvas.height = h; |
... | ... | @@ -1895,6 +1910,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1895 | 1910 | |
1896 | 1911 | } |
1897 | 1912 | } |
1913 | + else { | |
1914 | + $rootScope.isLoading = false; | |
1915 | + $('#spinner').css('visibility', 'hidden'); | |
1916 | + } | |
1898 | 1917 | } |
1899 | 1918 | |
1900 | 1919 | console.log('ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length); |
... | ... | @@ -2165,7 +2184,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2165 | 2184 | $scope.aligneCanvasWithTerm() |
2166 | 2185 | } |
2167 | 2186 | |
2168 | - $timeout(function () { $scope.DisableProgressBar() }, 1000); | |
2187 | + // $timeout(function () { $scope.DisableProgressBar() }, 1000); | |
2169 | 2188 | |
2170 | 2189 | |
2171 | 2190 | |
... | ... | @@ -2399,16 +2418,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2399 | 2418 | |
2400 | 2419 | if ($scope.doAligneCanvasWithTerm == true) { |
2401 | 2420 | |
2402 | - if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) | |
2421 | + if ($rootScope.isListManagerSelected == true) | |
2422 | + $scope.aligneCanvasWithTerm(); | |
2423 | + | |
2424 | + else if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) { | |
2403 | 2425 | |
2404 | 2426 | $rootScope.isLoading = false; |
2405 | 2427 | |
2406 | - $('#spinner').css('visibility', 'hidden'); | |
2428 | + $('#spinner').css('visibility', 'hidden'); | |
2429 | + } | |
2407 | 2430 | |
2408 | 2431 | // $rootScope.isHighlightBodyByBodySystem = false; |
2409 | 2432 | |
2410 | - if ($rootScope.isListManagerSelected == true) | |
2411 | - $scope.aligneCanvasWithTerm(); | |
2433 | + | |
2412 | 2434 | } |
2413 | 2435 | } |
2414 | 2436 | // |
... | ... | @@ -5018,56 +5040,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5018 | 5040 | |
5019 | 5041 | $scope.flushCanvas = function () { |
5020 | 5042 | |
5021 | - //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
5022 | - // angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
5023 | - | |
5024 | - // var id; | |
5025 | - // var maskId; | |
5026 | - // if (value.haveMirror == 'true') { | |
5027 | - // id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
5028 | - // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
5029 | - // } | |
5030 | - // else { | |
5031 | - // id = 'imageCanvas' + value.bodyRegionId; | |
5032 | - // maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
5033 | - // } | |
5034 | 5043 | |
5035 | - // var canvas = document.getElementById(id); | |
5036 | - // if (canvas != null || canvas != undefined) { | |
5037 | - // document.getElementById('canvasDiv').removeChild(canvas); | |
5038 | - // } | |
5039 | - | |
5040 | - // var maskcanvas = document.getElementById(maskId); | |
5041 | - // if (maskcanvas != null || maskcanvas != undefined) { | |
5042 | - // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
5044 | + $rootScope.isLoading = true; | |
5045 | + $('#spinner').css('visibility', 'visible'); | |
5043 | 5046 | |
5044 | - // } | |
5045 | - // if (i == 4 || i == 5 || i == 6) { | |
5046 | - // id = 'imageCanvas' + i + '_MR'; | |
5047 | - // maskId = 'imageCanvas' + i + '_MR_mci'; | |
5048 | - | |
5049 | - // var canvas = document.getElementById(id); | |
5050 | - // if (canvas != null || canvas != undefined) | |
5051 | - // document.getElementById('canvasDiv').removeChild(canvas); | |
5052 | - | |
5053 | - // var maskcanvas = document.getElementById(maskId); | |
5054 | - // if (maskcanvas != null || maskcanvas != undefined) | |
5055 | - // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
5056 | - // } | |
5057 | - | |
5058 | - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
5059 | - // for (var i = 0; i < modestyCanvases.length; i++) { | |
5060 | - // modestyCanvases[i].remove(); | |
5061 | - // } | |
5062 | - // }); | |
5063 | - // //remove modesty canavs | |
5064 | - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
5065 | - // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { | |
5066 | - // for (var j = 0; j < modestyCanvases.length; j++) { | |
5067 | - // modestyCanvases[j].remove(); | |
5068 | - // } | |
5069 | - // } | |
5070 | - //} | |
5071 | 5047 | var endIndex = 0; |
5072 | 5048 | var startIndex = 0; |
5073 | 5049 | if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) { |
... | ... | @@ -5625,9 +5601,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5625 | 5601 | if ($scope.isEligibleForHighlightBodyByTermList == true) { |
5626 | 5602 | //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE |
5627 | 5603 | // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) { |
5628 | - $scope.isLoading = false; | |
5604 | + //$scope.isLoading = false; | |
5629 | 5605 | |
5630 | - $('#spinner').css('visibility', 'hidden'); | |
5606 | + //$('#spinner').css('visibility', 'hidden'); | |
5631 | 5607 | //} |
5632 | 5608 | |
5633 | 5609 | if (($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { |
... | ... | @@ -7003,6 +6979,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7003 | 6979 | $('#spinner').css('visibility', 'hidden'); |
7004 | 6980 | } |
7005 | 6981 | else { |
6982 | + | |
6983 | + $rootScope.isLoading = true; | |
6984 | + | |
6985 | + $('#spinner').css('visibility', 'visible'); | |
6986 | + | |
6987 | + | |
7006 | 6988 | $rootScope.prevId = event.currentTarget.id; |
7007 | 6989 | $("#termList").find("option").attr('selected', false); |
7008 | 6990 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
... | ... | @@ -7025,10 +7007,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7025 | 7007 | } |
7026 | 7008 | } |
7027 | 7009 | //--- |
7028 | - $rootScope.isLoading = true; | |
7029 | - | |
7030 | - $('#spinner').css('visibility', 'visible'); | |
7031 | - | |
7010 | + | |
7032 | 7011 | $rootScope.isHighlightBodyByBodySystem = false; |
7033 | 7012 | |
7034 | 7013 | //1. |
... | ... | @@ -7134,8 +7113,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7134 | 7113 | |
7135 | 7114 | //8.remove current layer canavses |
7136 | 7115 | $scope.flushCanvas(); |
7137 | - | |
7138 | - | |
7116 | + | |
7139 | 7117 | |
7140 | 7118 | //9. |
7141 | 7119 | $timeout(function () { |
... | ... | @@ -7150,6 +7128,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7150 | 7128 | //DA > Annotation's Line should not displayed. |
7151 | 7129 | $("#bord").css("display", "none"); |
7152 | 7130 | |
7131 | + $rootScope.isLoading = true; | |
7132 | + $('#spinner').css('visibility', 'visible'); | |
7133 | + | |
7153 | 7134 | //redraw body of respective layer |
7154 | 7135 | $scope.CalculateImageCordinates($rootScope.viewOrientationId) |
7155 | 7136 | }, 500); | ... | ... |