Commit 82d9c42f19ba130b6751a5ce6e8efb8d7a04bf71
1 parent
aa9dd83b
fixed list manager and search issue.
Showing
1 changed file
with
156 additions
and
226 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) { |
... | ... | @@ -23,7 +24,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
23 | 24 | $scope.drawnBodyRegions; |
24 | 25 | //view specific constants |
25 | 26 | $rootScope.voId; |
26 | - $rootScope.layerNumber; | |
27 | + $scope.layerNumber; | |
27 | 28 | $scope.daCounter = 1; |
28 | 29 | $scope.bagartDetails; |
29 | 30 | $scope.transNumber = 50; |
... | ... | @@ -623,7 +624,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
623 | 624 | |
624 | 625 | $rootScope.isNormalMode = true; |
625 | 626 | |
626 | - $rootScope.layerNumber = 0; | |
627 | + $scope.layerNumber = 0; | |
627 | 628 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
628 | 629 | |
629 | 630 | $rootScope.viewOrientationId = $rootScope.voId; |
... | ... | @@ -717,11 +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 | - { | |
724 | - console.log('$scope.bodyRegionCoordinates length= ' + $scope.bodyRegionCoordinates.length) | |
721 | + if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) { | |
722 | + angular.forEach($scope.bodyRegionCoordinates, function (value, key) { | |
725 | 723 | |
726 | 724 | if (value._HaveMirrorImage == 'Y') { |
727 | 725 | |
... | ... | @@ -734,7 +732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
734 | 732 | var src = $scope.GetImageSource(value._BodyRegionId); |
735 | 733 | |
736 | 734 | $scope.imageSource = src; |
737 | - | |
735 | + | |
738 | 736 | //2.Draw mirror image |
739 | 737 | $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
740 | 738 | // debugger; |
... | ... | @@ -757,7 +755,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
757 | 755 | //0. Scaling as per default zoom |
758 | 756 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0); |
759 | 757 | |
760 | - | |
758 | + | |
761 | 759 | //1.Draw body region which have mirror image |
762 | 760 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
763 | 761 | $scope.BodyRegionCordinatesData.push( |
... | ... | @@ -773,7 +771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
773 | 771 | |
774 | 772 | } |
775 | 773 | else { |
776 | - | |
774 | + | |
777 | 775 | //0.Scaling as per default zoom |
778 | 776 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); |
779 | 777 | |
... | ... | @@ -787,7 +785,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
787 | 785 | $scope.imageSource = src; |
788 | 786 | } |
789 | 787 | |
790 | - | |
791 | 788 | //2.Draw body region which don't have mirror image |
792 | 789 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
793 | 790 | |
... | ... | @@ -813,6 +810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
813 | 810 | var gender; |
814 | 811 | if (localStorage.getItem("genderId") == 'Female') { |
815 | 812 | gender = 'F'; |
813 | + | |
816 | 814 | } |
817 | 815 | else { |
818 | 816 | gender = 'M'; |
... | ... | @@ -842,7 +840,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
842 | 840 | |
843 | 841 | if ((dtlOfSktn != null || dtlOfSktn != undefined) && (dtlOfSktn.length > 0)) { |
844 | 842 | |
845 | - if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($rootScope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($rootScope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) { | |
843 | + if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($scope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($scope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) { | |
846 | 844 | $scope.figLaefImageName = dtlOfSktn[0]._ImageId; |
847 | 845 | //$scope.figLaefX = filtereddata[0]._X; |
848 | 846 | //$scope.figLaefY = filtereddata[0]._Y; |
... | ... | @@ -897,7 +895,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
897 | 895 | $('#canvasDiv').scrollTop(50) |
898 | 896 | var abc = $rootScope.BodyRegionCordinatesData; |
899 | 897 | //debugger; |
900 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($rootScope.layerNumber)); | |
898 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
901 | 899 | // $('#spinner').css('visibility', 'hidden'); |
902 | 900 | $rootScope.isLoading = false; |
903 | 901 | //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. |
... | ... | @@ -986,6 +984,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
986 | 984 | |
987 | 985 | } |
988 | 986 | |
987 | + | |
989 | 988 | $scope.GetImageSource = function (bodyRegionId) { |
990 | 989 | // debugger; |
991 | 990 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
... | ... | @@ -1007,27 +1006,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1007 | 1006 | if ((SelectedLayerData != null || SelectedLayerData != undefined)) |
1008 | 1007 | |
1009 | 1008 | if ($scope.layerNumber == 0) { |
1010 | - console.log('lNo: ' + $scope.layerNumber + ' and BodyRegion.length: ' + SelectedLayerData.BodyRegion.length); | |
1011 | - | |
1012 | 1009 | if (SelectedLayerData.BodyRegion.length > 0) { |
1013 | 1010 | for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { |
1014 | 1011 | |
1015 | 1012 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; |
1016 | 1013 | var bodyRegionSkinTone = SelectedLayerData.BodyRegion[z].Image._SkintTone; |
1017 | 1014 | |
1018 | - if ($rootScope.viewOrientationId == 3 && bodyRegionId==1) { | |
1019 | - console.log('$rootScope.voId: ' + $rootScope.voId); | |
1020 | - if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') { | |
1021 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1022 | - } | |
1023 | - } | |
1015 | + if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | |
1024 | 1016 | |
1025 | - else { | |
1026 | - | |
1027 | - if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | |
1028 | - | |
1029 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1030 | - } | |
1017 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1031 | 1018 | } |
1032 | 1019 | } |
1033 | 1020 | } |
... | ... | @@ -1059,67 +1046,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1059 | 1046 | } |
1060 | 1047 | |
1061 | 1048 | } |
1062 | - //$scope.GetImageSource = function (bodyRegionId) { | |
1063 | - // // debugger; | |
1064 | - // var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; | |
1065 | - | |
1066 | - // //set max for LayerNumber input | |
1067 | - // $scope.totalLayers = dataLength - 1; | |
1068 | - // // debugger | |
1069 | - // $('#txtLayerNumber').attr('max', $scope.totalLayers); | |
1070 | - // $('#layerChangeSlider').slider("option", "max", $scope.totalLayers); | |
1071 | - // // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($rootScope.layerNumber)); | |
1072 | - | |
1073 | - // $scope.one = 1; | |
1074 | - | |
1075 | - // $scope.userInput = parseInt($rootScope.layerNumber); | |
1076 | - // $scope.skinTone = $rootScope.globalSetting.ethnicity; | |
1077 | - | |
1078 | - // var SelectedLayerData = []; | |
1079 | - // SelectedLayerData = $rootScope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1]; | |
1080 | - // if ((SelectedLayerData != null || SelectedLayerData != undefined)) | |
1081 | - | |
1082 | - // if ($rootScope.layerNumber == 0) { | |
1083 | - // if (SelectedLayerData.BodyRegion.length > 0) { | |
1084 | - // for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { | |
1085 | - | |
1086 | - // var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; | |
1087 | - // var bodyRegionSkinTone = SelectedLayerData.BodyRegion[z].Image._SkintTone; | |
1088 | - | |
1089 | - // if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | |
1090 | - | |
1091 | - // return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1092 | - // } | |
1093 | - // } | |
1094 | - // } | |
1095 | - // } | |
1096 | - // else { | |
1097 | - // // debugger; | |
1098 | - // //below 4 bodyviews have only single body region | |
1099 | - // if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) { | |
1100 | - // var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId; | |
1101 | - | |
1102 | - // return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | |
1103 | - | |
1104 | - // } | |
1105 | - // else // it is for other body view which have multiple body regions and layer no > 0 | |
1106 | - // { | |
1107 | - // // debugger; | |
1108 | - // if (SelectedLayerData.BodyRegion.length > 0) { | |
1109 | - // for (var z = 0; z <= SelectedLayerData.BodyRegion.length; z++) { | |
1110 | - // var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; | |
1111 | - // if (bodyRegion == bodyRegionId) { | |
1112 | - | |
1113 | - // return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1114 | - | |
1115 | - | |
1116 | - // } | |
1117 | - // } | |
1118 | - // } | |
1119 | - // } | |
1120 | - // } | |
1121 | - | |
1122 | - //} | |
1123 | 1049 | |
1124 | 1050 | $scope.GetBackgroundImgSource = function (bodyRegionId) { |
1125 | 1051 | // debugger; |
... | ... | @@ -1201,8 +1127,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1201 | 1127 | FlipedImgCanvas.addEventListener('click', function (evt) { |
1202 | 1128 | |
1203 | 1129 | //to get correct data on multihighlight highlight |
1204 | - if($scope.isLayerChange == true) | |
1205 | - { | |
1130 | + if ($scope.isLayerChange == true) { | |
1206 | 1131 | $scope.isLayerChange = false; |
1207 | 1132 | } |
1208 | 1133 | |
... | ... | @@ -1483,7 +1408,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1483 | 1408 | $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) { |
1484 | 1409 | |
1485 | 1410 | var imgCanvas = document.createElement('canvas'); |
1486 | - | |
1411 | + | |
1487 | 1412 | imgCanvas.height = h; |
1488 | 1413 | imgCanvas.width = w; |
1489 | 1414 | imgCanvas.setAttribute("data-IsMirrored", "N") |
... | ... | @@ -1869,7 +1794,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1869 | 1794 | else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { |
1870 | 1795 | loopLength = 1; |
1871 | 1796 | } |
1872 | - | |
1797 | + | |
1873 | 1798 | if (loopLength !== 0) { |
1874 | 1799 | for (var x = 0; x < loopLength; x++) { |
1875 | 1800 | if ($rootScope.MaskCanvasData[x] != null || $rootScope.MaskCanvasData[x] != undefined) { |
... | ... | @@ -1912,7 +1837,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1912 | 1837 | //push workers in array to further used the refernece to delete the workers |
1913 | 1838 | $scope.runningWorkers.push({ 'workerName': worker }) |
1914 | 1839 | |
1915 | - console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white) | |
1840 | + // console.log('for bodyRegionId = ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) | |
1916 | 1841 | |
1917 | 1842 | if (coloredImageDataVar != null && maskData != null && white != null) { |
1918 | 1843 | worker.postMessage({ |
... | ... | @@ -1956,7 +1881,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1956 | 1881 | |
1957 | 1882 | if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { |
1958 | 1883 | |
1959 | - var canavsWidth = parseInt(grayCanvas.width) ; | |
1884 | + var canavsWidth = parseInt(grayCanvas.width); | |
1960 | 1885 | var canavsHeight = parseInt(grayCanvas.height); |
1961 | 1886 | |
1962 | 1887 | console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) |
... | ... | @@ -1973,7 +1898,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1973 | 1898 | grayCanvasContext.putImageData(imgData, 0, 0); |
1974 | 1899 | } |
1975 | 1900 | |
1976 | - | |
1901 | + | |
1977 | 1902 | if ($rootScope.multiAnnotationIsON == true) { |
1978 | 1903 | //debugger; |
1979 | 1904 | if (canvasId.match('_MR')) |
... | ... | @@ -2016,6 +1941,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2016 | 1941 | |
2017 | 1942 | $scope.HighlightBodyByTermList = function (TermList) { |
2018 | 1943 | |
1944 | + //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) { | |
1945 | + // $rootScope.updatedGrayMRDataList = null; | |
1946 | + // $rootScope.updatedGrayMRDataList = []; | |
1947 | + //} | |
1948 | + //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) { | |
1949 | + // $rootScope.updatedGrayDataList = null; | |
1950 | + // $rootScope.updatedGrayDataList = []; | |
1951 | + //} | |
2019 | 1952 | |
2020 | 1953 | console.log('HighlightBodyByTermList is called'); |
2021 | 1954 | |
... | ... | @@ -2026,8 +1959,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2026 | 1959 | |
2027 | 1960 | |
2028 | 1961 | |
2029 | - $timeout(function () | |
2030 | - { | |
1962 | + $timeout(function () { | |
2031 | 1963 | var loopLength = 0; |
2032 | 1964 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
2033 | 1965 | loopLength = 9; |
... | ... | @@ -2067,9 +1999,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2067 | 1999 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
2068 | 2000 | } |
2069 | 2001 | } |
2070 | - else | |
2071 | - | |
2072 | - { | |
2002 | + else { | |
2073 | 2003 | if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { |
2074 | 2004 | |
2075 | 2005 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
... | ... | @@ -2106,7 +2036,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2106 | 2036 | if ($scope.isLayerChange == true) { |
2107 | 2037 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
2108 | 2038 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; |
2109 | - | |
2039 | + | |
2110 | 2040 | } |
2111 | 2041 | |
2112 | 2042 | } else { |
... | ... | @@ -2190,11 +2120,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2190 | 2120 | if (canvasId.match('_MR')) { |
2191 | 2121 | $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; |
2192 | 2122 | |
2123 | + //alert('HighlightBodyByTermList, is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON); | |
2124 | + | |
2125 | + //$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData; | |
2193 | 2126 | } |
2194 | 2127 | else |
2195 | 2128 | $rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData; |
2196 | 2129 | |
2197 | - | |
2130 | + //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); | |
2131 | + | |
2198 | 2132 | console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) |
2199 | 2133 | |
2200 | 2134 | if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) { |
... | ... | @@ -2239,8 +2173,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2239 | 2173 | |
2240 | 2174 | |
2241 | 2175 | |
2242 | - | |
2243 | - | |
2244 | 2176 | $scope.createTermListByPreviousTermsAndHighlight = function () { |
2245 | 2177 | |
2246 | 2178 | |
... | ... | @@ -2264,14 +2196,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2264 | 2196 | |
2265 | 2197 | console.log('createTermListByPreviousTermsAndHighlight is called'); |
2266 | 2198 | |
2267 | - if ((multiTermList != undefined || multiTermList!=null) && multiTermList.length>0) { | |
2199 | + if ((multiTermList != undefined || multiTermList != null) && multiTermList.length > 0) { | |
2268 | 2200 | |
2269 | 2201 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50); |
2270 | 2202 | } |
2271 | 2203 | } |
2272 | 2204 | |
2273 | 2205 | |
2274 | - | |
2275 | 2206 | $scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) { |
2276 | 2207 | var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1); |
2277 | 2208 | |
... | ... | @@ -2449,7 +2380,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2449 | 2380 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { |
2450 | 2381 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); |
2451 | 2382 | // debugger; |
2452 | - $rootScope.layerNumber = parseInt(txtlayerNumber.value); | |
2383 | + $scope.layerNumber = parseInt(txtlayerNumber.value); | |
2453 | 2384 | |
2454 | 2385 | |
2455 | 2386 | $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false); |
... | ... | @@ -2465,7 +2396,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2465 | 2396 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { |
2466 | 2397 | $('#txtlayerNumber').val(dataLength - 1); |
2467 | 2398 | $scope.currentLayerNumber = parseInt(dataLength - 1); |
2468 | - $rootScope.layerNumber = parseInt(dataLength - 1); | |
2399 | + $scope.layerNumber = parseInt(dataLength - 1); | |
2469 | 2400 | } |
2470 | 2401 | else |
2471 | 2402 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); |
... | ... | @@ -2488,7 +2419,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2488 | 2419 | $timeout(function () { $scope.DisableProgressBar() }, 1000); |
2489 | 2420 | } |
2490 | 2421 | |
2491 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($rootScope.layerNumber)); | |
2422 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
2492 | 2423 | } |
2493 | 2424 | |
2494 | 2425 | $scope.DisableProgressBar = function () { |
... | ... | @@ -3714,14 +3645,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3714 | 3645 | } |
3715 | 3646 | else if (isLayerChanged) { |
3716 | 3647 | // debugger |
3717 | - $rootScope.layerNumber = parseInt($('#txtlayerNumber').val()); | |
3648 | + $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | |
3718 | 3649 | |
3719 | 3650 | } |
3720 | 3651 | else { |
3721 | 3652 | var currentLayer = parseInt($('#txtlayerNumber').val()); |
3722 | 3653 | |
3723 | 3654 | var tranparencyLayer = currentLayer + 1; |
3724 | - $rootScope.layerNumber = tranparencyLayer; | |
3655 | + $scope.layerNumber = tranparencyLayer; | |
3725 | 3656 | } |
3726 | 3657 | |
3727 | 3658 | //dedebugger; |
... | ... | @@ -3953,7 +3884,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3953 | 3884 | PreviousBodyRegionX = XforTransImage; |
3954 | 3885 | previousBodyRegionId = bodyRegionId; |
3955 | 3886 | |
3956 | - // $rootScope.layerNumber = parseInt($rootScope.layerNumber - 1); | |
3887 | + // $scope.layerNumber = parseInt($scope.layerNumber - 1); | |
3957 | 3888 | |
3958 | 3889 | } |
3959 | 3890 | |
... | ... | @@ -4452,7 +4383,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4452 | 4383 | } |
4453 | 4384 | //var scope = angular.element(document.getElementById("DAView")).scope(); |
4454 | 4385 | //scope.$apply(function () { |
4455 | - // $rootScope.layerNumber = 0; | |
4386 | + // $scope.layerNumber = 0; | |
4456 | 4387 | $scope.isTransparencyActivated = false; |
4457 | 4388 | //}) |
4458 | 4389 | |
... | ... | @@ -4466,7 +4397,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4466 | 4397 | |
4467 | 4398 | //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']")) |
4468 | 4399 | //.remove(); |
4469 | - $rootScope.layerNumber = $scope.currentLayerNumber; | |
4400 | + $scope.layerNumber = $scope.currentLayerNumber; | |
4470 | 4401 | $scope.transNumber = 50; |
4471 | 4402 | $(".slider").slider({ value: 50 }) |
4472 | 4403 | } |
... | ... | @@ -4597,75 +4528,75 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4597 | 4528 | |
4598 | 4529 | $scope.flushCanvas = function () { |
4599 | 4530 | |
4600 | - if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4601 | - angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4531 | + //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4532 | + // angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4602 | 4533 | |
4603 | - var id; | |
4604 | - var maskId; | |
4605 | - if (value.haveMirror == 'true') { | |
4606 | - id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
4607 | - maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
4608 | - } | |
4609 | - else { | |
4610 | - id = 'imageCanvas' + value.bodyRegionId; | |
4611 | - maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
4612 | - } | |
4534 | + // var id; | |
4535 | + // var maskId; | |
4536 | + // if (value.haveMirror == 'true') { | |
4537 | + // id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
4538 | + // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
4539 | + // } | |
4540 | + // else { | |
4541 | + // id = 'imageCanvas' + value.bodyRegionId; | |
4542 | + // maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
4543 | + // } | |
4613 | 4544 | |
4614 | - var canvas = document.getElementById(id); | |
4615 | - if (canvas != null || canvas != undefined) { | |
4616 | - document.getElementById('canvasDiv').removeChild(canvas); | |
4617 | - } | |
4545 | + // var canvas = document.getElementById(id); | |
4546 | + // if (canvas != null || canvas != undefined) { | |
4547 | + // document.getElementById('canvasDiv').removeChild(canvas); | |
4548 | + // } | |
4618 | 4549 | |
4619 | - var maskcanvas = document.getElementById(maskId); | |
4620 | - if (maskcanvas != null || maskcanvas != undefined) { | |
4621 | - document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4550 | + // var maskcanvas = document.getElementById(maskId); | |
4551 | + // if (maskcanvas != null || maskcanvas != undefined) { | |
4552 | + // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4622 | 4553 | |
4623 | - } | |
4554 | + // } | |
4624 | 4555 | |
4625 | - var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4626 | - for (var i = 0; i < modestyCanvases.length; i++) { | |
4627 | - modestyCanvases[i].remove(); | |
4628 | - } | |
4629 | - }); | |
4630 | - } | |
4556 | + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4557 | + // for (var i = 0; i < modestyCanvases.length; i++) { | |
4558 | + // modestyCanvases[i].remove(); | |
4559 | + // } | |
4560 | + // }); | |
4561 | + //} | |
4631 | 4562 | |
4632 | - //for (var i = 1; i < 7; i++) { | |
4563 | + for (var i = 1; i < 7; i++) { | |
4633 | 4564 | |
4634 | - // var id; | |
4635 | - // var maskId; | |
4565 | + var id; | |
4566 | + var maskId; | |
4636 | 4567 | |
4637 | - // id = 'imageCanvas' + i; | |
4638 | - // maskId = 'imageCanvas' + i + '_mci'; | |
4568 | + id = 'imageCanvas' + i; | |
4569 | + maskId = 'imageCanvas' + i + '_mci'; | |
4639 | 4570 | |
4640 | - // var canvas = document.getElementById(id); | |
4641 | - // if (canvas != null || canvas != undefined) | |
4642 | - // document.getElementById('canvasDiv').removeChild(canvas); | |
4571 | + var canvas = document.getElementById(id); | |
4572 | + if (canvas != null || canvas != undefined) | |
4573 | + document.getElementById('canvasDiv').removeChild(canvas); | |
4643 | 4574 | |
4644 | - // var maskcanvas = document.getElementById(maskId); | |
4645 | - // if (maskcanvas != null || maskcanvas != undefined) | |
4646 | - // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4575 | + var maskcanvas = document.getElementById(maskId); | |
4576 | + if (maskcanvas != null || maskcanvas != undefined) | |
4577 | + document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4647 | 4578 | |
4648 | - // if (i == 4 || i == 5 || i == 6) { | |
4649 | - // id = 'imageCanvas' + i + '_MR'; | |
4650 | - // maskId = 'imageCanvas' + i + '_MR_mci'; | |
4579 | + if (i == 4 || i == 5 || i == 6) { | |
4580 | + id = 'imageCanvas' + i + '_MR'; | |
4581 | + maskId = 'imageCanvas' + i + '_MR_mci'; | |
4651 | 4582 | |
4652 | - // var canvas = document.getElementById(id); | |
4653 | - // if (canvas != null || canvas != undefined) | |
4654 | - // document.getElementById('canvasDiv').removeChild(canvas); | |
4583 | + var canvas = document.getElementById(id); | |
4584 | + if (canvas != null || canvas != undefined) | |
4585 | + document.getElementById('canvasDiv').removeChild(canvas); | |
4655 | 4586 | |
4656 | - // var maskcanvas = document.getElementById(maskId); | |
4657 | - // if (maskcanvas != null || maskcanvas != undefined) | |
4658 | - // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4659 | - // } | |
4587 | + var maskcanvas = document.getElementById(maskId); | |
4588 | + if (maskcanvas != null || maskcanvas != undefined) | |
4589 | + document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4590 | + } | |
4660 | 4591 | |
4661 | - // //remove modesty canavs | |
4662 | - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4663 | - // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { | |
4664 | - // for (var j = 0; j < modestyCanvases.length; j++) { | |
4665 | - // modestyCanvases[j].remove(); | |
4666 | - // } | |
4667 | - // } | |
4668 | - //} | |
4592 | + //remove modesty canavs | |
4593 | + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4594 | + if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { | |
4595 | + for (var j = 0; j < modestyCanvases.length; j++) { | |
4596 | + modestyCanvases[j].remove(); | |
4597 | + } | |
4598 | + } | |
4599 | + } | |
4669 | 4600 | } |
4670 | 4601 | |
4671 | 4602 | $scope.terminateCurrentlyRunningWPs = function () { |
... | ... | @@ -4805,7 +4736,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4805 | 4736 | |
4806 | 4737 | $scope.highLightBody = function () { |
4807 | 4738 | |
4808 | - // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId); | |
4739 | + console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length); | |
4809 | 4740 | |
4810 | 4741 | $scope.terminateCurrentlyRunningWPs(); |
4811 | 4742 | |
... | ... | @@ -4828,13 +4759,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4828 | 4759 | $scope.doHighlightOrExtract = false; |
4829 | 4760 | } |
4830 | 4761 | |
4831 | - console.log('$scope.doHighlightOrExtract= ' + $scope.doHighlightOrExtract) | |
4762 | + | |
4832 | 4763 | if ($scope.doHighlightOrExtract == true) { |
4833 | 4764 | if ($rootScope.isHighLight == true) { |
4834 | 4765 | |
4835 | 4766 | $scope.grayedBR = []; |
4836 | 4767 | |
4837 | 4768 | angular.forEach($scope.ColoredImageSRC, function (value, key) { |
4769 | + console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length) | |
4838 | 4770 | var id; |
4839 | 4771 | if (value.haveMirror == 'true') { |
4840 | 4772 | id = 'imageCanvas' + value.bodyRegionId + '_MR'; |
... | ... | @@ -4874,7 +4806,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4874 | 4806 | img.src = dataURL; |
4875 | 4807 | |
4876 | 4808 | img.onload = function () { |
4877 | - | |
4809 | + console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= ' | |
4810 | + + value.bodyRegionId) | |
4878 | 4811 | |
4879 | 4812 | var DAData = new BitmapData(Math.max(img.width), Math.max(img.height)); |
4880 | 4813 | DAData.draw(img); |
... | ... | @@ -4892,26 +4825,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4892 | 4825 | |
4893 | 4826 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); |
4894 | 4827 | |
4895 | - | |
4828 | + | |
4896 | 4829 | context_gray.putImageData(DAData.data, 0, 0) |
4897 | - | |
4898 | - // to resolve lateral arm black issue in highlight mode | |
4899 | 4830 | |
4900 | - if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) { | |
4901 | - | |
4831 | + //NIKI- to resolve lateral arm black issue in highlight mode | |
4832 | + | |
4833 | + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) { | |
4834 | + | |
4902 | 4835 | var imgData = context_gray.getImageData(0, 0, width, ht); |
4903 | 4836 | var data = imgData.data; |
4904 | - var c=0; | |
4837 | + var c = 0; | |
4905 | 4838 | for (var i = 0; i < data.length; i += 4) { |
4906 | 4839 | if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { |
4907 | 4840 | data[i + 3] = 0; |
4908 | 4841 | } |
4909 | - | |
4842 | + | |
4910 | 4843 | } |
4911 | 4844 | context_gray.putImageData(imgData, 0, 0); |
4912 | 4845 | } |
4913 | - | |
4914 | - // | |
4846 | + | |
4915 | 4847 | //push BRID into array |
4916 | 4848 | $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); |
4917 | 4849 | |
... | ... | @@ -4975,6 +4907,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4975 | 4907 | } |
4976 | 4908 | else if ($scope.isHighlightByListManager == true) { |
4977 | 4909 | |
4910 | + // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); | |
4978 | 4911 | $timeout(function () { |
4979 | 4912 | |
4980 | 4913 | $scope.HighlightBodyByTermList($scope.AllTerms) |
... | ... | @@ -4984,7 +4917,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4984 | 4917 | else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
4985 | 4918 | $scope.createTermListByPreviousTermsAndHighlight(); |
4986 | 4919 | } |
4987 | - | |
4988 | 4920 | |
4989 | 4921 | } |
4990 | 4922 | |
... | ... | @@ -4997,12 +4929,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4997 | 4929 | |
4998 | 4930 | if ($rootScope.isExtract == true) { |
4999 | 4931 | if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
5000 | - console.log('HighlightBodyOnExtract') | |
4932 | + | |
5001 | 4933 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); |
5002 | 4934 | } |
5003 | 4935 | } |
5004 | 4936 | //else { |
5005 | - // console.log('INSIDE ELSE. $scope.grayedBR.length= ' + $scope.grayedBR.length) | |
5006 | 4937 | // // 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 |
5007 | 4938 | // //and then highlight the previously selected body regions at the time of normal mode. |
5008 | 4939 | // if ($scope.grayedBR != null || $scope.grayedBR != undefined) { |
... | ... | @@ -5021,14 +4952,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5021 | 4952 | |
5022 | 4953 | |
5023 | 4954 | // } |
5024 | - // console.log('INSIDE ELSE $scope.isEligibleForHighlightBodyByTermList = ' + $scope.isEligibleForHighlightBodyByTermList) | |
4955 | + | |
5025 | 4956 | // // |
5026 | 4957 | //} |
5027 | 4958 | }) |
5028 | - | |
5029 | - //if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
5030 | - // console.log('CREATE multiTermList') | |
5031 | 4959 | |
4960 | + //if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
5032 | 4961 | // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
5033 | 4962 | |
5034 | 4963 | // var multiTermList = []; |
... | ... | @@ -5071,6 +5000,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5071 | 5000 | |
5072 | 5001 | var imageCanvas = document.getElementById(id); |
5073 | 5002 | |
5003 | + //var coloredCanvasID = 'imageCanvas' + bodyRegionId; | |
5004 | + //var coloredCanvas = document.getElementById(coloredCanvasID); | |
5074 | 5005 | |
5075 | 5006 | var width = value.Width; |
5076 | 5007 | var ht = value.Height; |
... | ... | @@ -5382,7 +5313,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5382 | 5313 | $('#spinner').css('visibility', 'visible'); |
5383 | 5314 | |
5384 | 5315 | $rootScope.isViewChange = true; |
5385 | - $rootScope.layerNumber = 0; | |
5316 | + $scope.layerNumber = 0; | |
5386 | 5317 | // debugger; |
5387 | 5318 | var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; |
5388 | 5319 | $rootScope.viewOrientationId = selectedViewId; |
... | ... | @@ -5522,9 +5453,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5522 | 5453 | //console.log('reloadDABodyViewEvent'); |
5523 | 5454 | |
5524 | 5455 | $scope.ReloadBodyViewId = data.reloadDABodyViewId; |
5525 | - // $rootScope.layerNumber = 0; | |
5456 | + // $scope.layerNumber = 0; | |
5526 | 5457 | // debugger; |
5527 | - var layerNumber = $rootScope.layerNumber | |
5458 | + | |
5528 | 5459 | console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); |
5529 | 5460 | |
5530 | 5461 | if ($rootScope.isSettingEventAlredayDispachted == true) { |
... | ... | @@ -5545,7 +5476,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5545 | 5476 | $rootScope.voId = currentBodyViewId; |
5546 | 5477 | |
5547 | 5478 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
5548 | - if($scope.NavigatorData!=null || $scope.NavigatorData!=undefined){ | |
5479 | + | |
5549 | 5480 | var navdtlOrient = new jinqJs() |
5550 | 5481 | .from($scope.NavigatorData.Navigtor.ViewOrientation) |
5551 | 5482 | .where("_ViewOrientationId == " + $scope.voId) |
... | ... | @@ -5579,7 +5510,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5579 | 5510 | } |
5580 | 5511 | } |
5581 | 5512 | } |
5582 | - } | |
5583 | 5513 | |
5584 | 5514 | //Annotation tool event lsitener |
5585 | 5515 | |
... | ... | @@ -5593,7 +5523,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5593 | 5523 | $scope.$on('annotationToolEvent', function (event, data) { |
5594 | 5524 | $("#canvas").css("display", "block"); |
5595 | 5525 | $("#canvasPaint").css("display", "block"); |
5596 | - // $rootScope.FreeStylePaint(); | |
5526 | + // $rootScope.FreeStylePaint(); | |
5597 | 5527 | $scope.doClick(); |
5598 | 5528 | }); |
5599 | 5529 | $scope.mousePs; |
... | ... | @@ -6173,7 +6103,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6173 | 6103 | |
6174 | 6104 | } |
6175 | 6105 | |
6176 | - //-- TextArea functionality of Annotation toolbar | |
6106 | + //-- TextArea functionality of Annotation toolbar | |
6177 | 6107 | |
6178 | 6108 | $rootScope.fontSizes; |
6179 | 6109 | $rootScope.fontWeight; |
... | ... | @@ -6184,8 +6114,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6184 | 6114 | $rootScope.textArea; |
6185 | 6115 | $rootScope.fontFamily; |
6186 | 6116 | $rootScope.saveText = function () { |
6187 | - | |
6188 | - $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6117 | + | |
6118 | + $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6189 | 6119 | $rootScope.fontWeight = $("#text_area").css("font-weight"); |
6190 | 6120 | $rootScope.fontStyle = $("#text_area").css("font-style"); |
6191 | 6121 | $rootScope.textAlignmt = $("#text_area").css("text-align"); |
... | ... | @@ -6195,11 +6125,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6195 | 6125 | $rootScope.textArea = $("#text_area").val(); |
6196 | 6126 | $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); |
6197 | 6127 | $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
6198 | - | |
6128 | + | |
6199 | 6129 | $('#canvas').drawText({ |
6200 | 6130 | layer: true, |
6201 | 6131 | draggable: true, |
6202 | - name:'TextArea_'+ $rootScope.resetText, | |
6132 | + name: 'TextArea_' + $rootScope.resetText, | |
6203 | 6133 | groups: ['TextArea_' + $rootScope.resetText], |
6204 | 6134 | dragGroups: ['TextArea_' + $rootScope.resetText], |
6205 | 6135 | fillStyle: $rootScope.fontColor, |
... | ... | @@ -6212,16 +6142,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6212 | 6142 | x: $scope.offsetX1, y: $scope.offsetY1, |
6213 | 6143 | maxWidth: $scope.x - $scope.offsetX1, |
6214 | 6144 | maxHeight: $scope.y - $scope.offsetY1, |
6215 | - | |
6145 | + | |
6216 | 6146 | click: function (layer) { |
6217 | - | |
6218 | 6147 | |
6219 | - | |
6148 | + | |
6149 | + | |
6220 | 6150 | }, |
6221 | 6151 | change: function (layer, props) { |
6222 | 6152 | |
6223 | 6153 | } |
6224 | - | |
6154 | + | |
6225 | 6155 | }) |
6226 | 6156 | // Draw rect as wide as the text |
6227 | 6157 | .drawRect({ |
... | ... | @@ -6238,19 +6168,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6238 | 6168 | |
6239 | 6169 | click: function (layer) { |
6240 | 6170 | $rootScope.shapeTypeText = "textAreaRect"; |
6241 | - | |
6171 | + | |
6242 | 6172 | var layerNameSplit = layer.name; |
6243 | - | |
6173 | + | |
6244 | 6174 | var splitedName = layerNameSplit.split("_"); |
6245 | - | |
6175 | + | |
6246 | 6176 | var textValName = "TextArea_"; |
6247 | - | |
6177 | + | |
6248 | 6178 | var concatinateResult = textValName.concat(splitedName[1]); |
6249 | - | |
6179 | + | |
6250 | 6180 | $rootScope.canvasLayerNameCollection = []; |
6251 | 6181 | $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); |
6252 | - | |
6253 | - | |
6182 | + | |
6183 | + | |
6254 | 6184 | |
6255 | 6185 | $('#canvas').setLayer(layer.name, { |
6256 | 6186 | handle: { |
... | ... | @@ -6265,7 +6195,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6265 | 6195 | |
6266 | 6196 | }, |
6267 | 6197 | mouseout: function (layer) { |
6268 | - | |
6198 | + | |
6269 | 6199 | $rootScope.canvasLayerNameCollection = []; |
6270 | 6200 | $('#canvas').setLayer(layer.name, { |
6271 | 6201 | handle: { |
... | ... | @@ -6281,7 +6211,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6281 | 6211 | |
6282 | 6212 | }, |
6283 | 6213 | mouseover: function (layer) { |
6284 | - | |
6214 | + | |
6285 | 6215 | $('#canvas').setLayer(layer.name, { |
6286 | 6216 | handle: { |
6287 | 6217 | type: 'rectangle', |
... | ... | @@ -6296,25 +6226,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6296 | 6226 | } |
6297 | 6227 | }); |
6298 | 6228 | $("#text_area").val(''); |
6299 | - | |
6300 | - $("#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"}); | |
6301 | - | |
6229 | + | |
6230 | + $("#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" }); | |
6231 | + | |
6302 | 6232 | } |
6303 | 6233 | |
6304 | 6234 | |
6305 | 6235 | |
6306 | 6236 | function OnPaintCanvasMouseMove(event) { |
6307 | 6237 | |
6308 | - | |
6238 | + | |
6309 | 6239 | } |
6310 | 6240 | |
6311 | 6241 | $rootScope.FreeStylePaint = function (e) { |
6312 | 6242 | // debugger; |
6313 | 6243 | |
6314 | - // alert("asasssas"); | |
6244 | + // alert("asasssas"); | |
6315 | 6245 | $rootScope.shapeType = "FreeStylePaint"; |
6316 | 6246 | canvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false); |
6317 | - | |
6247 | + | |
6318 | 6248 | } |
6319 | 6249 | |
6320 | 6250 | $(document).keydown(function (event) { |
... | ... | @@ -6656,7 +6586,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6656 | 6586 | |
6657 | 6587 | if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { |
6658 | 6588 | $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); |
6659 | - } | |
6589 | + } | |
6660 | 6590 | |
6661 | 6591 | } |
6662 | 6592 | |
... | ... | @@ -6671,7 +6601,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6671 | 6601 | var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item; |
6672 | 6602 | |
6673 | 6603 | //var systemListHtml = '<option value="0" selected="">All</option>' |
6674 | - $('#bodySystems').empty(); | |
6675 | 6604 | |
6676 | 6605 | var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems'); |
6677 | 6606 | $compile($all)($scope); |
... | ... | @@ -6707,7 +6636,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6707 | 6636 | |
6708 | 6637 | // var TermTextList = []; |
6709 | 6638 | // var TermTextList = []; |
6710 | - $('#termList').empty(); | |
6639 | + | |
6711 | 6640 | $scope.loadListManger(); |
6712 | 6641 | |
6713 | 6642 | |
... | ... | @@ -6769,6 +6698,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6769 | 6698 | }) |
6770 | 6699 | |
6771 | 6700 | |
6701 | + | |
6772 | 6702 | $scope.VocabTermTxt = new jinqJs() |
6773 | 6703 | .from(vocabTermTxt) |
6774 | 6704 | .distinct('_TermText', '_ActualTermNumber') |
... | ... | @@ -6792,7 +6722,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6792 | 6722 | } |
6793 | 6723 | // }) |
6794 | 6724 | |
6795 | - | |
6725 | + | |
6796 | 6726 | //.error(function (data, status, headers, config) { |
6797 | 6727 | |
6798 | 6728 | // console.log(data); |
... | ... | @@ -6850,7 +6780,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6850 | 6780 | layerNumber = parseInt(layerNumber) - 1; |
6851 | 6781 | } |
6852 | 6782 | |
6853 | - $rootScope.layerNumber = layerNumber; | |
6783 | + $scope.layerNumber = layerNumber; | |
6854 | 6784 | |
6855 | 6785 | //4.get scroll position |
6856 | 6786 | if (actualTermNumber != DA[0].SKIN_TERM_ID) { |
... | ... | @@ -6891,8 +6821,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6891 | 6821 | } |
6892 | 6822 | } |
6893 | 6823 | |
6894 | - $('#txtlayerNumber').val((parseInt($rootScope.layerNumber))); | |
6895 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($rootScope.layerNumber)); | |
6824 | + $('#txtlayerNumber').val((parseInt($scope.layerNumber))); | |
6825 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
6896 | 6826 | |
6897 | 6827 | //8.remove current layer canavses |
6898 | 6828 | $scope.flushCanvas(); | ... | ... |