Commit 00c11b3b0f709335d8ded7a3a384813c878c30bd
Merge branch 'AnnotationToolBar_latestMerge1' of http://52.6.196.163/ADAM/AIAHTM…
…L5 into updatededitstyle
Showing
2 changed files
with
164 additions
and
130 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1 | -'use strict'; | |
1 | + | |
2 | +'use strict'; | |
2 | 3 | |
3 | 4 | AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", |
4 | 5 | function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) { |
... | ... | @@ -717,10 +718,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
717 | 718 | $scope.ColoredImageSRC = []; |
718 | 719 | } |
719 | 720 | |
720 | - if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) | |
721 | - { | |
722 | - angular.forEach($scope.bodyRegionCoordinates, function (value, key) | |
723 | - { | |
721 | + if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) { | |
722 | + angular.forEach($scope.bodyRegionCoordinates, function (value, key) { | |
724 | 723 | |
725 | 724 | if (value._HaveMirrorImage == 'Y') { |
726 | 725 | |
... | ... | @@ -733,7 +732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
733 | 732 | var src = $scope.GetImageSource(value._BodyRegionId); |
734 | 733 | |
735 | 734 | $scope.imageSource = src; |
736 | - | |
735 | + | |
737 | 736 | //2.Draw mirror image |
738 | 737 | $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
739 | 738 | // debugger; |
... | ... | @@ -756,7 +755,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
756 | 755 | //0. Scaling as per default zoom |
757 | 756 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0); |
758 | 757 | |
759 | - | |
758 | + | |
760 | 759 | //1.Draw body region which have mirror image |
761 | 760 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
762 | 761 | $scope.BodyRegionCordinatesData.push( |
... | ... | @@ -772,7 +771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
772 | 771 | |
773 | 772 | } |
774 | 773 | else { |
775 | - | |
774 | + | |
776 | 775 | //0.Scaling as per default zoom |
777 | 776 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); |
778 | 777 | |
... | ... | @@ -786,7 +785,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
786 | 785 | $scope.imageSource = src; |
787 | 786 | } |
788 | 787 | |
789 | - | |
790 | 788 | //2.Draw body region which don't have mirror image |
791 | 789 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
792 | 790 | |
... | ... | @@ -812,6 +810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
812 | 810 | var gender; |
813 | 811 | if (localStorage.getItem("genderId") == 'Female') { |
814 | 812 | gender = 'F'; |
813 | + | |
815 | 814 | } |
816 | 815 | else { |
817 | 816 | gender = 'M'; |
... | ... | @@ -992,6 +991,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
992 | 991 | } |
993 | 992 | |
994 | 993 | |
994 | + | |
995 | 995 | $scope.GetImageSource = function (bodyRegionId) { |
996 | 996 | // debugger; |
997 | 997 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
... | ... | @@ -1146,8 +1146,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1146 | 1146 | FlipedImgCanvas.addEventListener('click', function (evt) { |
1147 | 1147 | |
1148 | 1148 | //to get correct data on multihighlight highlight |
1149 | - if($scope.isLayerChange == true) | |
1150 | - { | |
1149 | + if ($scope.isLayerChange == true) { | |
1151 | 1150 | $scope.isLayerChange = false; |
1152 | 1151 | } |
1153 | 1152 | |
... | ... | @@ -1428,7 +1427,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1428 | 1427 | $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) { |
1429 | 1428 | |
1430 | 1429 | var imgCanvas = document.createElement('canvas'); |
1431 | - | |
1430 | + | |
1432 | 1431 | imgCanvas.height = h; |
1433 | 1432 | imgCanvas.width = w; |
1434 | 1433 | imgCanvas.setAttribute("data-IsMirrored", "N") |
... | ... | @@ -1814,7 +1813,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1814 | 1813 | else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { |
1815 | 1814 | loopLength = 1; |
1816 | 1815 | } |
1817 | - | |
1816 | + | |
1818 | 1817 | if (loopLength !== 0) { |
1819 | 1818 | for (var x = 0; x < loopLength; x++) { |
1820 | 1819 | if ($rootScope.MaskCanvasData[x] != null || $rootScope.MaskCanvasData[x] != undefined) { |
... | ... | @@ -1918,7 +1917,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1918 | 1917 | grayCanvasContext.putImageData(imgData, 0, 0); |
1919 | 1918 | } |
1920 | 1919 | |
1921 | - | |
1920 | + | |
1922 | 1921 | if ($rootScope.multiAnnotationIsON == true) { |
1923 | 1922 | //debugger; |
1924 | 1923 | if (canvasId.match('_MR')) |
... | ... | @@ -1961,6 +1960,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1961 | 1960 | |
1962 | 1961 | $scope.HighlightBodyByTermList = function (TermList) { |
1963 | 1962 | |
1963 | + //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) { | |
1964 | + // $rootScope.updatedGrayMRDataList = null; | |
1965 | + // $rootScope.updatedGrayMRDataList = []; | |
1966 | + //} | |
1967 | + //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) { | |
1968 | + // $rootScope.updatedGrayDataList = null; | |
1969 | + // $rootScope.updatedGrayDataList = []; | |
1970 | + //} | |
1964 | 1971 | |
1965 | 1972 | console.log('HighlightBodyByTermList is called'); |
1966 | 1973 | |
... | ... | @@ -2051,7 +2058,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2051 | 2058 | if ($scope.isLayerChange == true) { |
2052 | 2059 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
2053 | 2060 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; |
2054 | - | |
2061 | + | |
2055 | 2062 | } |
2056 | 2063 | |
2057 | 2064 | } else { |
... | ... | @@ -2135,11 +2142,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2135 | 2142 | if (canvasId.match('_MR')) { |
2136 | 2143 | $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; |
2137 | 2144 | |
2145 | + //alert('HighlightBodyByTermList, is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON); | |
2146 | + | |
2147 | + //$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData; | |
2138 | 2148 | } |
2139 | 2149 | else |
2140 | 2150 | $rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData; |
2141 | 2151 | |
2142 | - | |
2152 | + //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); | |
2153 | + | |
2143 | 2154 | console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) |
2144 | 2155 | |
2145 | 2156 | if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) { |
... | ... | @@ -2184,8 +2195,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2184 | 2195 | |
2185 | 2196 | |
2186 | 2197 | |
2187 | - | |
2188 | - | |
2189 | 2198 | $scope.createTermListByPreviousTermsAndHighlight = function () { |
2190 | 2199 | |
2191 | 2200 | |
... | ... | @@ -2209,14 +2218,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2209 | 2218 | |
2210 | 2219 | console.log('createTermListByPreviousTermsAndHighlight is called'); |
2211 | 2220 | |
2212 | - if ((multiTermList != undefined || multiTermList!=null) && multiTermList.length>0) { | |
2221 | + if ((multiTermList != undefined || multiTermList != null) && multiTermList.length > 0) { | |
2213 | 2222 | |
2214 | 2223 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50); |
2215 | 2224 | } |
2216 | 2225 | } |
2217 | 2226 | |
2218 | 2227 | |
2219 | - | |
2220 | 2228 | $scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) { |
2221 | 2229 | var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1); |
2222 | 2230 | |
... | ... | @@ -2575,7 +2583,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2575 | 2583 | else { |
2576 | 2584 | console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) |
2577 | 2585 | } |
2578 | - | |
2586 | + if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){ | |
2579 | 2587 | if ($scope.longestAnnotation.length <= 10) { |
2580 | 2588 | |
2581 | 2589 | |
... | ... | @@ -2634,6 +2642,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2634 | 2642 | |
2635 | 2643 | |
2636 | 2644 | } |
2645 | + | |
2646 | + } | |
2637 | 2647 | var Globe = []; |
2638 | 2648 | Globe.push({ currentX: x, currentY: y }); |
2639 | 2649 | |
... | ... | @@ -4542,54 +4552,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4542 | 4552 | |
4543 | 4553 | $scope.flushCanvas = function () { |
4544 | 4554 | |
4545 | - if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4546 | - angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4547 | - | |
4548 | - var id; | |
4549 | - var maskId; | |
4550 | - if (value.haveMirror == 'true') { | |
4551 | - id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
4552 | - maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
4553 | - } | |
4554 | - else { | |
4555 | - id = 'imageCanvas' + value.bodyRegionId; | |
4556 | - maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
4557 | - } | |
4558 | - | |
4559 | - var canvas = document.getElementById(id); | |
4560 | - if (canvas != null || canvas != undefined) { | |
4561 | - document.getElementById('canvasDiv').removeChild(canvas); | |
4562 | - } | |
4563 | - | |
4564 | - var maskcanvas = document.getElementById(maskId); | |
4565 | - if (maskcanvas != null || maskcanvas != undefined) { | |
4566 | - document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4567 | - | |
4568 | - } | |
4555 | + //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4556 | + // angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4569 | 4557 | |
4570 | - var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4571 | - for (var i = 0; i < modestyCanvases.length; i++) { | |
4572 | - modestyCanvases[i].remove(); | |
4573 | - } | |
4574 | - }); | |
4575 | - } | |
4576 | - | |
4577 | - //for (var i = 1; i < 7; i++) { | |
4578 | - | |
4579 | - // var id; | |
4580 | - // var maskId; | |
4581 | - | |
4582 | - // id = 'imageCanvas' + i; | |
4583 | - // maskId = 'imageCanvas' + i + '_mci'; | |
4558 | + // var id; | |
4559 | + // var maskId; | |
4560 | + // if (value.haveMirror == 'true') { | |
4561 | + // id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
4562 | + // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
4563 | + // } | |
4564 | + // else { | |
4565 | + // id = 'imageCanvas' + value.bodyRegionId; | |
4566 | + // maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
4567 | + // } | |
4584 | 4568 | |
4585 | - // var canvas = document.getElementById(id); | |
4586 | - // if (canvas != null || canvas != undefined) | |
4587 | - // document.getElementById('canvasDiv').removeChild(canvas); | |
4569 | + // var canvas = document.getElementById(id); | |
4570 | + // if (canvas != null || canvas != undefined) { | |
4571 | + // document.getElementById('canvasDiv').removeChild(canvas); | |
4572 | + // } | |
4588 | 4573 | |
4589 | - // var maskcanvas = document.getElementById(maskId); | |
4590 | - // if (maskcanvas != null || maskcanvas != undefined) | |
4591 | - // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4574 | + // var maskcanvas = document.getElementById(maskId); | |
4575 | + // if (maskcanvas != null || maskcanvas != undefined) { | |
4576 | + // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4592 | 4577 | |
4578 | + // } | |
4593 | 4579 | // if (i == 4 || i == 5 || i == 6) { |
4594 | 4580 | // id = 'imageCanvas' + i + '_MR'; |
4595 | 4581 | // maskId = 'imageCanvas' + i + '_MR_mci'; |
... | ... | @@ -4603,6 +4589,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4603 | 4589 | // document.getElementById('canvasDiv').removeChild(maskcanvas); |
4604 | 4590 | // } |
4605 | 4591 | |
4592 | + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4593 | + // for (var i = 0; i < modestyCanvases.length; i++) { | |
4594 | + // modestyCanvases[i].remove(); | |
4595 | + // } | |
4596 | + // }); | |
4606 | 4597 | // //remove modesty canavs |
4607 | 4598 | // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); |
4608 | 4599 | // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { |
... | ... | @@ -4611,6 +4602,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4611 | 4602 | // } |
4612 | 4603 | // } |
4613 | 4604 | //} |
4605 | + | |
4606 | + for (var i = 1; i < 7; i++) { | |
4607 | + | |
4608 | + var id; | |
4609 | + var maskId; | |
4610 | + | |
4611 | + id = 'imageCanvas' + i; | |
4612 | + maskId = 'imageCanvas' + i + '_mci'; | |
4613 | + | |
4614 | + var canvas = document.getElementById(id); | |
4615 | + if (canvas != null || canvas != undefined) | |
4616 | + document.getElementById('canvasDiv').removeChild(canvas); | |
4617 | + | |
4618 | + var maskcanvas = document.getElementById(maskId); | |
4619 | + if (maskcanvas != null || maskcanvas != undefined) | |
4620 | + document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4621 | + | |
4622 | + if (i == 4 || i == 5 || i == 6) { | |
4623 | + id = 'imageCanvas' + i + '_MR'; | |
4624 | + maskId = 'imageCanvas' + i + '_MR_mci'; | |
4625 | + | |
4626 | + var canvas = document.getElementById(id); | |
4627 | + if (canvas != null || canvas != undefined) | |
4628 | + document.getElementById('canvasDiv').removeChild(canvas); | |
4629 | + | |
4630 | + var maskcanvas = document.getElementById(maskId); | |
4631 | + if (maskcanvas != null || maskcanvas != undefined) | |
4632 | + document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4633 | + } | |
4634 | + | |
4635 | + //remove modesty canavs | |
4636 | + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4637 | + if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { | |
4638 | + for (var j = 0; j < modestyCanvases.length; j++) { | |
4639 | + modestyCanvases[j].remove(); | |
4640 | + } | |
4641 | + } | |
4642 | + } | |
4614 | 4643 | } |
4615 | 4644 | |
4616 | 4645 | $scope.terminateCurrentlyRunningWPs = function () { |
... | ... | @@ -4750,7 +4779,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4750 | 4779 | |
4751 | 4780 | $scope.highLightBody = function () { |
4752 | 4781 | |
4753 | - // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId); | |
4782 | + console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length); | |
4754 | 4783 | |
4755 | 4784 | $scope.terminateCurrentlyRunningWPs(); |
4756 | 4785 | |
... | ... | @@ -4773,13 +4802,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4773 | 4802 | $scope.doHighlightOrExtract = false; |
4774 | 4803 | } |
4775 | 4804 | |
4776 | - console.log('$scope.doHighlightOrExtract= ' + $scope.doHighlightOrExtract) | |
4805 | + | |
4777 | 4806 | if ($scope.doHighlightOrExtract == true) { |
4778 | 4807 | if ($rootScope.isHighLight == true) { |
4779 | 4808 | |
4780 | 4809 | $scope.grayedBR = []; |
4781 | 4810 | |
4782 | 4811 | angular.forEach($scope.ColoredImageSRC, function (value, key) { |
4812 | + console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length) | |
4783 | 4813 | var id; |
4784 | 4814 | if (value.haveMirror == 'true') { |
4785 | 4815 | id = 'imageCanvas' + value.bodyRegionId + '_MR'; |
... | ... | @@ -4819,7 +4849,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4819 | 4849 | img.src = dataURL; |
4820 | 4850 | |
4821 | 4851 | img.onload = function () { |
4822 | - | |
4852 | + console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= ' | |
4853 | + + value.bodyRegionId) | |
4823 | 4854 | |
4824 | 4855 | var DAData = new BitmapData(Math.max(img.width), Math.max(img.height)); |
4825 | 4856 | DAData.draw(img); |
... | ... | @@ -4837,26 +4868,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4837 | 4868 | |
4838 | 4869 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); |
4839 | 4870 | |
4840 | - | |
4871 | + | |
4841 | 4872 | context_gray.putImageData(DAData.data, 0, 0) |
4842 | - | |
4843 | - // to resolve lateral arm black issue in highlight mode | |
4844 | 4873 | |
4845 | - if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) { | |
4846 | - | |
4874 | + //NIKI- to resolve lateral arm black issue in highlight mode | |
4875 | + | |
4876 | + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) { | |
4877 | + | |
4847 | 4878 | var imgData = context_gray.getImageData(0, 0, width, ht); |
4848 | 4879 | var data = imgData.data; |
4849 | - var c=0; | |
4880 | + var c = 0; | |
4850 | 4881 | for (var i = 0; i < data.length; i += 4) { |
4851 | 4882 | if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { |
4852 | 4883 | data[i + 3] = 0; |
4853 | 4884 | } |
4854 | - | |
4885 | + | |
4855 | 4886 | } |
4856 | 4887 | context_gray.putImageData(imgData, 0, 0); |
4857 | 4888 | } |
4858 | - | |
4859 | - // | |
4889 | + | |
4860 | 4890 | //push BRID into array |
4861 | 4891 | $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); |
4862 | 4892 | |
... | ... | @@ -4920,6 +4950,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4920 | 4950 | } |
4921 | 4951 | else if ($scope.isHighlightByListManager == true) { |
4922 | 4952 | |
4953 | + // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); | |
4923 | 4954 | $timeout(function () { |
4924 | 4955 | |
4925 | 4956 | $scope.HighlightBodyByTermList($scope.AllTerms) |
... | ... | @@ -4929,7 +4960,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4929 | 4960 | else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
4930 | 4961 | $scope.createTermListByPreviousTermsAndHighlight(); |
4931 | 4962 | } |
4932 | - | |
4933 | 4963 | |
4934 | 4964 | } |
4935 | 4965 | |
... | ... | @@ -4942,12 +4972,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4942 | 4972 | |
4943 | 4973 | if ($rootScope.isExtract == true) { |
4944 | 4974 | if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
4945 | - console.log('HighlightBodyOnExtract') | |
4975 | + | |
4946 | 4976 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); |
4947 | 4977 | } |
4948 | 4978 | } |
4949 | 4979 | //else { |
4950 | - // console.log('INSIDE ELSE. $scope.grayedBR.length= ' + $scope.grayedBR.length) | |
4951 | 4980 | // // this code is for the case where user first clcik on normal mode then extract then again highlight then we need to call highlight body in gray mode |
4952 | 4981 | // //and then highlight the previously selected body regions at the time of normal mode. |
4953 | 4982 | // if ($scope.grayedBR != null || $scope.grayedBR != undefined) { |
... | ... | @@ -4966,14 +4995,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4966 | 4995 | |
4967 | 4996 | |
4968 | 4997 | // } |
4969 | - // console.log('INSIDE ELSE $scope.isEligibleForHighlightBodyByTermList = ' + $scope.isEligibleForHighlightBodyByTermList) | |
4998 | + | |
4970 | 4999 | // // |
4971 | 5000 | //} |
4972 | 5001 | }) |
4973 | - | |
4974 | - //if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
4975 | - // console.log('CREATE multiTermList') | |
4976 | 5002 | |
5003 | + //if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
4977 | 5004 | // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
4978 | 5005 | |
4979 | 5006 | // var multiTermList = []; |
... | ... | @@ -5016,6 +5043,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5016 | 5043 | |
5017 | 5044 | var imageCanvas = document.getElementById(id); |
5018 | 5045 | |
5046 | + //var coloredCanvasID = 'imageCanvas' + bodyRegionId; | |
5047 | + //var coloredCanvas = document.getElementById(coloredCanvasID); | |
5019 | 5048 | |
5020 | 5049 | var width = value.Width; |
5021 | 5050 | var ht = value.Height; |
... | ... | @@ -5491,38 +5520,42 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5491 | 5520 | |
5492 | 5521 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
5493 | 5522 | |
5494 | - var navdtlOrient = new jinqJs() | |
5495 | - .from($scope.NavigatorData.Navigtor.ViewOrientation) | |
5496 | - .where("_ViewOrientationId == " + $scope.voId) | |
5497 | - .select(); | |
5498 | - if (navdtlOrient != null || navdtlOrient != undefined) { | |
5523 | + //if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) { | |
5524 | + var navdtlOrient = new jinqJs() | |
5525 | + .from($scope.NavigatorData.Navigtor.ViewOrientation) | |
5526 | + .where("_ViewOrientationId == " + $scope.voId) | |
5527 | + .select(); | |
5528 | + | |
5499 | 5529 | |
5500 | - var navOrientationdata = new jinqJs() | |
5501 | - .from(navdtlOrient[0].ImageInfo) | |
5502 | - .where("_Ethnicity == " + $scope.skinTone) | |
5503 | - .select(); | |
5530 | + if (navdtlOrient != null || navdtlOrient != undefined) { | |
5504 | 5531 | |
5505 | - if (navOrientationdata != null || navOrientationdata != undefined) { | |
5532 | + var navOrientationdata = new jinqJs() | |
5533 | + .from(navdtlOrient[0].ImageInfo) | |
5534 | + .where("_Ethnicity == " + $scope.skinTone) | |
5535 | + .select(); | |
5506 | 5536 | |
5507 | - $scope.navigatorImage = navOrientationdata; | |
5537 | + if (navOrientationdata != null || navOrientationdata != undefined) { | |
5508 | 5538 | |
5539 | + $scope.navigatorImage = navOrientationdata; | |
5509 | 5540 | |
5510 | - var navImageModesty; | |
5511 | 5541 | |
5512 | - angular.forEach($scope.navigatorImage, function (value, key) { | |
5513 | - if (value._HaveModesty === $rootScope.globalSetting.modesty) { | |
5514 | - navImageModesty = value._ImageName; | |
5515 | - } | |
5516 | - }) | |
5517 | - if (typeof (navImageModesty) === "undefined" || navImageModesty === null) { | |
5542 | + var navImageModesty; | |
5518 | 5543 | |
5519 | - navImageModesty = $scope.navigatorImage[0]._ImageName; | |
5544 | + angular.forEach($scope.navigatorImage, function (value, key) { | |
5545 | + if (value._HaveModesty === $rootScope.globalSetting.modesty) { | |
5546 | + navImageModesty = value._ImageName; | |
5547 | + } | |
5548 | + }) | |
5549 | + if (typeof (navImageModesty) === "undefined" || navImageModesty === null) { | |
5520 | 5550 | |
5521 | - } | |
5551 | + navImageModesty = $scope.navigatorImage[0]._ImageName; | |
5522 | 5552 | |
5523 | - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; | |
5553 | + } | |
5554 | + | |
5555 | + $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; | |
5556 | + } | |
5524 | 5557 | } |
5525 | - } | |
5558 | + | |
5526 | 5559 | } |
5527 | 5560 | |
5528 | 5561 | //Annotation tool event lsitener |
... | ... | @@ -6131,7 +6164,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6131 | 6164 | |
6132 | 6165 | } |
6133 | 6166 | |
6134 | - //-- TextArea functionality of Annotation toolbar | |
6167 | + //-- TextArea functionality of Annotation toolbar | |
6135 | 6168 | |
6136 | 6169 | $rootScope.fontSizes; |
6137 | 6170 | $rootScope.fontWeight; |
... | ... | @@ -6142,8 +6175,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6142 | 6175 | $rootScope.textArea; |
6143 | 6176 | $rootScope.fontFamily; |
6144 | 6177 | $rootScope.saveText = function () { |
6145 | - | |
6146 | - $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6178 | + | |
6179 | + $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6147 | 6180 | $rootScope.fontWeight = $("#text_area").css("font-weight"); |
6148 | 6181 | $rootScope.fontStyle = $("#text_area").css("font-style"); |
6149 | 6182 | $rootScope.textAlignmt = $("#text_area").css("text-align"); |
... | ... | @@ -6157,7 +6190,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6157 | 6190 | $('#canvas').drawText({ |
6158 | 6191 | layer: true, |
6159 | 6192 | draggable: true, |
6160 | - name:'TextArea_'+ $rootScope.resetText, | |
6193 | + name: 'TextArea_' + $rootScope.resetText, | |
6161 | 6194 | groups: ['TextArea_' + $rootScope.resetText], |
6162 | 6195 | dragGroups: ['TextArea_' + $rootScope.resetText], |
6163 | 6196 | fillStyle: $rootScope.fontColor, |
... | ... | @@ -6170,16 +6203,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6170 | 6203 | x: $scope.offsetX1, y: $scope.offsetY1, |
6171 | 6204 | maxWidth: $scope.x - $scope.offsetX1, |
6172 | 6205 | maxHeight: $scope.y - $scope.offsetY1, |
6173 | - | |
6206 | + | |
6174 | 6207 | click: function (layer) { |
6175 | - | |
6176 | 6208 | |
6177 | - | |
6209 | + | |
6210 | + | |
6178 | 6211 | }, |
6179 | 6212 | change: function (layer, props) { |
6180 | 6213 | |
6181 | 6214 | } |
6182 | - | |
6215 | + | |
6183 | 6216 | }) |
6184 | 6217 | // Draw rect as wide as the text |
6185 | 6218 | .drawRect({ |
... | ... | @@ -6200,19 +6233,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6200 | 6233 | |
6201 | 6234 | click: function (layer) { |
6202 | 6235 | $rootScope.shapeTypeText = "textAreaRect"; |
6203 | - | |
6236 | + | |
6204 | 6237 | var layerNameSplit = layer.name; |
6205 | - | |
6238 | + | |
6206 | 6239 | var splitedName = layerNameSplit.split("_"); |
6207 | - | |
6240 | + | |
6208 | 6241 | var textValName = "TextArea_"; |
6209 | - | |
6242 | + | |
6210 | 6243 | var concatinateResult = textValName.concat(splitedName[1]); |
6211 | - | |
6244 | + | |
6212 | 6245 | $rootScope.canvasLayerNameCollection = []; |
6213 | 6246 | $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); |
6214 | - | |
6215 | - | |
6247 | + | |
6248 | + | |
6216 | 6249 | |
6217 | 6250 | $('#canvas').setLayer(layer.name, { |
6218 | 6251 | handle: { |
... | ... | @@ -6227,7 +6260,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6227 | 6260 | |
6228 | 6261 | }, |
6229 | 6262 | mouseout: function (layer) { |
6230 | - | |
6263 | + | |
6231 | 6264 | $rootScope.canvasLayerNameCollection = []; |
6232 | 6265 | $('#canvas').setLayer(layer.name, { |
6233 | 6266 | handle: { |
... | ... | @@ -6243,7 +6276,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6243 | 6276 | |
6244 | 6277 | }, |
6245 | 6278 | mouseover: function (layer) { |
6246 | - | |
6279 | + | |
6247 | 6280 | $('#canvas').setLayer(layer.name, { |
6248 | 6281 | handle: { |
6249 | 6282 | type: 'rectangle', |
... | ... | @@ -6258,16 +6291,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6258 | 6291 | } |
6259 | 6292 | }); |
6260 | 6293 | $("#text_area").val(''); |
6261 | - | |
6262 | - $("#text_area").css({" font-family":"'Verdana, sans-serif'","font-size":"14px","font-weight":"normal","font-style":"normal","color":"#000","text-align":"left","text-decoration":"none"}); | |
6263 | - | |
6294 | + | |
6295 | + $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
6296 | + | |
6264 | 6297 | } |
6265 | 6298 | |
6266 | 6299 | |
6267 | 6300 | |
6268 | 6301 | function OnPaintCanvasMouseMove(event) { |
6269 | 6302 | |
6270 | - | |
6303 | + | |
6271 | 6304 | } |
6272 | 6305 | |
6273 | 6306 | $rootScope.FreeStylePaint = function (e) { |
... | ... | @@ -6641,7 +6674,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6641 | 6674 | |
6642 | 6675 | if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { |
6643 | 6676 | $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); |
6644 | - } | |
6677 | + } | |
6645 | 6678 | |
6646 | 6679 | } |
6647 | 6680 | |
... | ... | @@ -6753,6 +6786,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6753 | 6786 | }) |
6754 | 6787 | |
6755 | 6788 | |
6789 | + | |
6756 | 6790 | $scope.VocabTermTxt = new jinqJs() |
6757 | 6791 | .from(vocabTermTxt) |
6758 | 6792 | .distinct('_TermText', '_ActualTermNumber') |
... | ... | @@ -6776,7 +6810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6776 | 6810 | } |
6777 | 6811 | // }) |
6778 | 6812 | |
6779 | - | |
6813 | + | |
6780 | 6814 | //.error(function (data, status, headers, config) { |
6781 | 6815 | |
6782 | 6816 | // console.log(data); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -75,7 +75,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
75 | 75 | if (alreadyOpenThisView != null) { |
76 | 76 | for (var i = 0; i < $rootScope.openViews.length; i++) { |
77 | 77 | k++; |
78 | - if ($rootScope.openViews[i].body - views == title) { | |
78 | + if ($rootScope.openViews[i].body-views == title) { | |
79 | 79 | $rootScope.openViews.splice((k - 1), 1); |
80 | 80 | |
81 | 81 | $rootScope.openViews.push( | ... | ... |