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 | AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", | 4 | AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", |
4 | function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) { | 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,7 +24,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
23 | $scope.drawnBodyRegions; | 24 | $scope.drawnBodyRegions; |
24 | //view specific constants | 25 | //view specific constants |
25 | $rootScope.voId; | 26 | $rootScope.voId; |
26 | - $rootScope.layerNumber; | 27 | + $scope.layerNumber; |
27 | $scope.daCounter = 1; | 28 | $scope.daCounter = 1; |
28 | $scope.bagartDetails; | 29 | $scope.bagartDetails; |
29 | $scope.transNumber = 50; | 30 | $scope.transNumber = 50; |
@@ -623,7 +624,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -623,7 +624,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
623 | 624 | ||
624 | $rootScope.isNormalMode = true; | 625 | $rootScope.isNormalMode = true; |
625 | 626 | ||
626 | - $rootScope.layerNumber = 0; | 627 | + $scope.layerNumber = 0; |
627 | $scope.skinTone = $rootScope.globalSetting.ethnicity; | 628 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
628 | 629 | ||
629 | $rootScope.viewOrientationId = $rootScope.voId; | 630 | $rootScope.viewOrientationId = $rootScope.voId; |
@@ -717,11 +718,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -717,11 +718,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
717 | $scope.ColoredImageSRC = []; | 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 | if (value._HaveMirrorImage == 'Y') { | 724 | if (value._HaveMirrorImage == 'Y') { |
727 | 725 | ||
@@ -734,7 +732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -734,7 +732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
734 | var src = $scope.GetImageSource(value._BodyRegionId); | 732 | var src = $scope.GetImageSource(value._BodyRegionId); |
735 | 733 | ||
736 | $scope.imageSource = src; | 734 | $scope.imageSource = src; |
737 | - | 735 | + |
738 | //2.Draw mirror image | 736 | //2.Draw mirror image |
739 | $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); | 737 | $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
740 | // debugger; | 738 | // debugger; |
@@ -757,7 +755,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -757,7 +755,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
757 | //0. Scaling as per default zoom | 755 | //0. Scaling as per default zoom |
758 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0); | 756 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0); |
759 | 757 | ||
760 | - | 758 | + |
761 | //1.Draw body region which have mirror image | 759 | //1.Draw body region which have mirror image |
762 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); | 760 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); |
763 | $scope.BodyRegionCordinatesData.push( | 761 | $scope.BodyRegionCordinatesData.push( |
@@ -773,7 +771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -773,7 +771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
773 | 771 | ||
774 | } | 772 | } |
775 | else { | 773 | else { |
776 | - | 774 | + |
777 | //0.Scaling as per default zoom | 775 | //0.Scaling as per default zoom |
778 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); | 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,7 +785,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
787 | $scope.imageSource = src; | 785 | $scope.imageSource = src; |
788 | } | 786 | } |
789 | 787 | ||
790 | - | ||
791 | //2.Draw body region which don't have mirror image | 788 | //2.Draw body region which don't have mirror image |
792 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N'); | 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,6 +810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
813 | var gender; | 810 | var gender; |
814 | if (localStorage.getItem("genderId") == 'Female') { | 811 | if (localStorage.getItem("genderId") == 'Female') { |
815 | gender = 'F'; | 812 | gender = 'F'; |
813 | + | ||
816 | } | 814 | } |
817 | else { | 815 | else { |
818 | gender = 'M'; | 816 | gender = 'M'; |
@@ -842,7 +840,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -842,7 +840,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
842 | 840 | ||
843 | if ((dtlOfSktn != null || dtlOfSktn != undefined) && (dtlOfSktn.length > 0)) { | 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 | $scope.figLaefImageName = dtlOfSktn[0]._ImageId; | 844 | $scope.figLaefImageName = dtlOfSktn[0]._ImageId; |
847 | //$scope.figLaefX = filtereddata[0]._X; | 845 | //$scope.figLaefX = filtereddata[0]._X; |
848 | //$scope.figLaefY = filtereddata[0]._Y; | 846 | //$scope.figLaefY = filtereddata[0]._Y; |
@@ -897,7 +895,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -897,7 +895,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
897 | $('#canvasDiv').scrollTop(50) | 895 | $('#canvasDiv').scrollTop(50) |
898 | var abc = $rootScope.BodyRegionCordinatesData; | 896 | var abc = $rootScope.BodyRegionCordinatesData; |
899 | //debugger; | 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 | // $('#spinner').css('visibility', 'hidden'); | 899 | // $('#spinner').css('visibility', 'hidden'); |
902 | $rootScope.isLoading = false; | 900 | $rootScope.isLoading = false; |
903 | //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. | 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,6 +984,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
986 | 984 | ||
987 | } | 985 | } |
988 | 986 | ||
987 | + | ||
989 | $scope.GetImageSource = function (bodyRegionId) { | 988 | $scope.GetImageSource = function (bodyRegionId) { |
990 | // debugger; | 989 | // debugger; |
991 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; | 990 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
@@ -1007,27 +1006,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1007,27 +1006,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1007 | if ((SelectedLayerData != null || SelectedLayerData != undefined)) | 1006 | if ((SelectedLayerData != null || SelectedLayerData != undefined)) |
1008 | 1007 | ||
1009 | if ($scope.layerNumber == 0) { | 1008 | if ($scope.layerNumber == 0) { |
1010 | - console.log('lNo: ' + $scope.layerNumber + ' and BodyRegion.length: ' + SelectedLayerData.BodyRegion.length); | ||
1011 | - | ||
1012 | if (SelectedLayerData.BodyRegion.length > 0) { | 1009 | if (SelectedLayerData.BodyRegion.length > 0) { |
1013 | for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { | 1010 | for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { |
1014 | 1011 | ||
1015 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; | 1012 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; |
1016 | var bodyRegionSkinTone = SelectedLayerData.BodyRegion[z].Image._SkintTone; | 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,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 | $scope.GetBackgroundImgSource = function (bodyRegionId) { | 1050 | $scope.GetBackgroundImgSource = function (bodyRegionId) { |
1125 | // debugger; | 1051 | // debugger; |
@@ -1201,8 +1127,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1201,8 +1127,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1201 | FlipedImgCanvas.addEventListener('click', function (evt) { | 1127 | FlipedImgCanvas.addEventListener('click', function (evt) { |
1202 | 1128 | ||
1203 | //to get correct data on multihighlight highlight | 1129 | //to get correct data on multihighlight highlight |
1204 | - if($scope.isLayerChange == true) | ||
1205 | - { | 1130 | + if ($scope.isLayerChange == true) { |
1206 | $scope.isLayerChange = false; | 1131 | $scope.isLayerChange = false; |
1207 | } | 1132 | } |
1208 | 1133 | ||
@@ -1483,7 +1408,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1483,7 +1408,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1483 | $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) { | 1408 | $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) { |
1484 | 1409 | ||
1485 | var imgCanvas = document.createElement('canvas'); | 1410 | var imgCanvas = document.createElement('canvas'); |
1486 | - | 1411 | + |
1487 | imgCanvas.height = h; | 1412 | imgCanvas.height = h; |
1488 | imgCanvas.width = w; | 1413 | imgCanvas.width = w; |
1489 | imgCanvas.setAttribute("data-IsMirrored", "N") | 1414 | imgCanvas.setAttribute("data-IsMirrored", "N") |
@@ -1869,7 +1794,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1869,7 +1794,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1869 | else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { | 1794 | else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) { |
1870 | loopLength = 1; | 1795 | loopLength = 1; |
1871 | } | 1796 | } |
1872 | - | 1797 | + |
1873 | if (loopLength !== 0) { | 1798 | if (loopLength !== 0) { |
1874 | for (var x = 0; x < loopLength; x++) { | 1799 | for (var x = 0; x < loopLength; x++) { |
1875 | if ($rootScope.MaskCanvasData[x] != null || $rootScope.MaskCanvasData[x] != undefined) { | 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,7 +1837,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1912 | //push workers in array to further used the refernece to delete the workers | 1837 | //push workers in array to further used the refernece to delete the workers |
1913 | $scope.runningWorkers.push({ 'workerName': worker }) | 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 | if (coloredImageDataVar != null && maskData != null && white != null) { | 1842 | if (coloredImageDataVar != null && maskData != null && white != null) { |
1918 | worker.postMessage({ | 1843 | worker.postMessage({ |
@@ -1956,7 +1881,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1956,7 +1881,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1956 | 1881 | ||
1957 | if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { | 1882 | if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { |
1958 | 1883 | ||
1959 | - var canavsWidth = parseInt(grayCanvas.width) ; | 1884 | + var canavsWidth = parseInt(grayCanvas.width); |
1960 | var canavsHeight = parseInt(grayCanvas.height); | 1885 | var canavsHeight = parseInt(grayCanvas.height); |
1961 | 1886 | ||
1962 | console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) | 1887 | console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) |
@@ -1973,7 +1898,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1973,7 +1898,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1973 | grayCanvasContext.putImageData(imgData, 0, 0); | 1898 | grayCanvasContext.putImageData(imgData, 0, 0); |
1974 | } | 1899 | } |
1975 | 1900 | ||
1976 | - | 1901 | + |
1977 | if ($rootScope.multiAnnotationIsON == true) { | 1902 | if ($rootScope.multiAnnotationIsON == true) { |
1978 | //debugger; | 1903 | //debugger; |
1979 | if (canvasId.match('_MR')) | 1904 | if (canvasId.match('_MR')) |
@@ -2016,6 +1941,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2016,6 +1941,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2016 | 1941 | ||
2017 | $scope.HighlightBodyByTermList = function (TermList) { | 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 | console.log('HighlightBodyByTermList is called'); | 1953 | console.log('HighlightBodyByTermList is called'); |
2021 | 1954 | ||
@@ -2026,8 +1959,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -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 | var loopLength = 0; | 1963 | var loopLength = 0; |
2032 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { | 1964 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
2033 | loopLength = 9; | 1965 | loopLength = 9; |
@@ -2067,9 +1999,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2067,9 +1999,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2067 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | 1999 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
2068 | } | 2000 | } |
2069 | } | 2001 | } |
2070 | - else | ||
2071 | - | ||
2072 | - { | 2002 | + else { |
2073 | if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | 2003 | if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { |
2074 | 2004 | ||
2075 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | 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,7 +2036,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2106 | if ($scope.isLayerChange == true) { | 2036 | if ($scope.isLayerChange == true) { |
2107 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { | 2037 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
2108 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; | 2038 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; |
2109 | - | 2039 | + |
2110 | } | 2040 | } |
2111 | 2041 | ||
2112 | } else { | 2042 | } else { |
@@ -2190,11 +2120,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2190,11 +2120,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2190 | if (canvasId.match('_MR')) { | 2120 | if (canvasId.match('_MR')) { |
2191 | $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; | 2121 | $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; |
2192 | 2122 | ||
2123 | + //alert('HighlightBodyByTermList, is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON); | ||
2124 | + | ||
2125 | + //$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData; | ||
2193 | } | 2126 | } |
2194 | else | 2127 | else |
2195 | $rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData; | 2128 | $rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData; |
2196 | 2129 | ||
2197 | - | 2130 | + //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); |
2131 | + | ||
2198 | console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) | 2132 | console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) |
2199 | 2133 | ||
2200 | if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) { | 2134 | if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) { |
@@ -2239,8 +2173,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2239,8 +2173,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2239 | 2173 | ||
2240 | 2174 | ||
2241 | 2175 | ||
2242 | - | ||
2243 | - | ||
2244 | $scope.createTermListByPreviousTermsAndHighlight = function () { | 2176 | $scope.createTermListByPreviousTermsAndHighlight = function () { |
2245 | 2177 | ||
2246 | 2178 | ||
@@ -2264,14 +2196,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2264,14 +2196,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2264 | 2196 | ||
2265 | console.log('createTermListByPreviousTermsAndHighlight is called'); | 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 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50); | 2201 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50); |
2270 | } | 2202 | } |
2271 | } | 2203 | } |
2272 | 2204 | ||
2273 | 2205 | ||
2274 | - | ||
2275 | $scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) { | 2206 | $scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) { |
2276 | var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1); | 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,7 +2380,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2449 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { | 2380 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { |
2450 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); | 2381 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); |
2451 | // debugger; | 2382 | // debugger; |
2452 | - $rootScope.layerNumber = parseInt(txtlayerNumber.value); | 2383 | + $scope.layerNumber = parseInt(txtlayerNumber.value); |
2453 | 2384 | ||
2454 | 2385 | ||
2455 | $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false); | 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,7 +2396,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2465 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { | 2396 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { |
2466 | $('#txtlayerNumber').val(dataLength - 1); | 2397 | $('#txtlayerNumber').val(dataLength - 1); |
2467 | $scope.currentLayerNumber = parseInt(dataLength - 1); | 2398 | $scope.currentLayerNumber = parseInt(dataLength - 1); |
2468 | - $rootScope.layerNumber = parseInt(dataLength - 1); | 2399 | + $scope.layerNumber = parseInt(dataLength - 1); |
2469 | } | 2400 | } |
2470 | else | 2401 | else |
2471 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | 2402 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); |
@@ -2488,7 +2419,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2488,7 +2419,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2488 | $timeout(function () { $scope.DisableProgressBar() }, 1000); | 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 | $scope.DisableProgressBar = function () { | 2425 | $scope.DisableProgressBar = function () { |
@@ -3714,14 +3645,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3714,14 +3645,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3714 | } | 3645 | } |
3715 | else if (isLayerChanged) { | 3646 | else if (isLayerChanged) { |
3716 | // debugger | 3647 | // debugger |
3717 | - $rootScope.layerNumber = parseInt($('#txtlayerNumber').val()); | 3648 | + $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
3718 | 3649 | ||
3719 | } | 3650 | } |
3720 | else { | 3651 | else { |
3721 | var currentLayer = parseInt($('#txtlayerNumber').val()); | 3652 | var currentLayer = parseInt($('#txtlayerNumber').val()); |
3722 | 3653 | ||
3723 | var tranparencyLayer = currentLayer + 1; | 3654 | var tranparencyLayer = currentLayer + 1; |
3724 | - $rootScope.layerNumber = tranparencyLayer; | 3655 | + $scope.layerNumber = tranparencyLayer; |
3725 | } | 3656 | } |
3726 | 3657 | ||
3727 | //dedebugger; | 3658 | //dedebugger; |
@@ -3953,7 +3884,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3953,7 +3884,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3953 | PreviousBodyRegionX = XforTransImage; | 3884 | PreviousBodyRegionX = XforTransImage; |
3954 | previousBodyRegionId = bodyRegionId; | 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,7 +4383,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4452 | } | 4383 | } |
4453 | //var scope = angular.element(document.getElementById("DAView")).scope(); | 4384 | //var scope = angular.element(document.getElementById("DAView")).scope(); |
4454 | //scope.$apply(function () { | 4385 | //scope.$apply(function () { |
4455 | - // $rootScope.layerNumber = 0; | 4386 | + // $scope.layerNumber = 0; |
4456 | $scope.isTransparencyActivated = false; | 4387 | $scope.isTransparencyActivated = false; |
4457 | //}) | 4388 | //}) |
4458 | 4389 | ||
@@ -4466,7 +4397,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4466,7 +4397,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4466 | 4397 | ||
4467 | //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']")) | 4398 | //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']")) |
4468 | //.remove(); | 4399 | //.remove(); |
4469 | - $rootScope.layerNumber = $scope.currentLayerNumber; | 4400 | + $scope.layerNumber = $scope.currentLayerNumber; |
4470 | $scope.transNumber = 50; | 4401 | $scope.transNumber = 50; |
4471 | $(".slider").slider({ value: 50 }) | 4402 | $(".slider").slider({ value: 50 }) |
4472 | } | 4403 | } |
@@ -4597,75 +4528,75 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4597,75 +4528,75 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4597 | 4528 | ||
4598 | $scope.flushCanvas = function () { | 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 | $scope.terminateCurrentlyRunningWPs = function () { | 4602 | $scope.terminateCurrentlyRunningWPs = function () { |
@@ -4805,7 +4736,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4805,7 +4736,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4805 | 4736 | ||
4806 | $scope.highLightBody = function () { | 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 | $scope.terminateCurrentlyRunningWPs(); | 4741 | $scope.terminateCurrentlyRunningWPs(); |
4811 | 4742 | ||
@@ -4828,13 +4759,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4828,13 +4759,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4828 | $scope.doHighlightOrExtract = false; | 4759 | $scope.doHighlightOrExtract = false; |
4829 | } | 4760 | } |
4830 | 4761 | ||
4831 | - console.log('$scope.doHighlightOrExtract= ' + $scope.doHighlightOrExtract) | 4762 | + |
4832 | if ($scope.doHighlightOrExtract == true) { | 4763 | if ($scope.doHighlightOrExtract == true) { |
4833 | if ($rootScope.isHighLight == true) { | 4764 | if ($rootScope.isHighLight == true) { |
4834 | 4765 | ||
4835 | $scope.grayedBR = []; | 4766 | $scope.grayedBR = []; |
4836 | 4767 | ||
4837 | angular.forEach($scope.ColoredImageSRC, function (value, key) { | 4768 | angular.forEach($scope.ColoredImageSRC, function (value, key) { |
4769 | + console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length) | ||
4838 | var id; | 4770 | var id; |
4839 | if (value.haveMirror == 'true') { | 4771 | if (value.haveMirror == 'true') { |
4840 | id = 'imageCanvas' + value.bodyRegionId + '_MR'; | 4772 | id = 'imageCanvas' + value.bodyRegionId + '_MR'; |
@@ -4874,7 +4806,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4874,7 +4806,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4874 | img.src = dataURL; | 4806 | img.src = dataURL; |
4875 | 4807 | ||
4876 | img.onload = function () { | 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 | var DAData = new BitmapData(Math.max(img.width), Math.max(img.height)); | 4812 | var DAData = new BitmapData(Math.max(img.width), Math.max(img.height)); |
4880 | DAData.draw(img); | 4813 | DAData.draw(img); |
@@ -4892,26 +4825,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4892,26 +4825,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4892 | 4825 | ||
4893 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); | 4826 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); |
4894 | 4827 | ||
4895 | - | 4828 | + |
4896 | context_gray.putImageData(DAData.data, 0, 0) | 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 | var imgData = context_gray.getImageData(0, 0, width, ht); | 4835 | var imgData = context_gray.getImageData(0, 0, width, ht); |
4903 | var data = imgData.data; | 4836 | var data = imgData.data; |
4904 | - var c=0; | 4837 | + var c = 0; |
4905 | for (var i = 0; i < data.length; i += 4) { | 4838 | for (var i = 0; i < data.length; i += 4) { |
4906 | if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | 4839 | if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { |
4907 | data[i + 3] = 0; | 4840 | data[i + 3] = 0; |
4908 | } | 4841 | } |
4909 | - | 4842 | + |
4910 | } | 4843 | } |
4911 | context_gray.putImageData(imgData, 0, 0); | 4844 | context_gray.putImageData(imgData, 0, 0); |
4912 | } | 4845 | } |
4913 | - | ||
4914 | - // | 4846 | + |
4915 | //push BRID into array | 4847 | //push BRID into array |
4916 | $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | 4848 | $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); |
4917 | 4849 | ||
@@ -4975,6 +4907,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4975,6 +4907,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4975 | } | 4907 | } |
4976 | else if ($scope.isHighlightByListManager == true) { | 4908 | else if ($scope.isHighlightByListManager == true) { |
4977 | 4909 | ||
4910 | + // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); | ||
4978 | $timeout(function () { | 4911 | $timeout(function () { |
4979 | 4912 | ||
4980 | $scope.HighlightBodyByTermList($scope.AllTerms) | 4913 | $scope.HighlightBodyByTermList($scope.AllTerms) |
@@ -4984,7 +4917,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4984,7 +4917,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4984 | else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | 4917 | else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
4985 | $scope.createTermListByPreviousTermsAndHighlight(); | 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,12 +4929,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4997 | 4929 | ||
4998 | if ($rootScope.isExtract == true) { | 4930 | if ($rootScope.isExtract == true) { |
4999 | if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | 4931 | if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
5000 | - console.log('HighlightBodyOnExtract') | 4932 | + |
5001 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | 4933 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); |
5002 | } | 4934 | } |
5003 | } | 4935 | } |
5004 | //else { | 4936 | //else { |
5005 | - // console.log('INSIDE ELSE. $scope.grayedBR.length= ' + $scope.grayedBR.length) | ||
5006 | // // 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 | 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 | // //and then highlight the previously selected body regions at the time of normal mode. | 4938 | // //and then highlight the previously selected body regions at the time of normal mode. |
5008 | // if ($scope.grayedBR != null || $scope.grayedBR != undefined) { | 4939 | // if ($scope.grayedBR != null || $scope.grayedBR != undefined) { |
@@ -5021,14 +4952,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -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 | // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | 4961 | // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
5033 | 4962 | ||
5034 | // var multiTermList = []; | 4963 | // var multiTermList = []; |
@@ -5071,6 +5000,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5071,6 +5000,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5071 | 5000 | ||
5072 | var imageCanvas = document.getElementById(id); | 5001 | var imageCanvas = document.getElementById(id); |
5073 | 5002 | ||
5003 | + //var coloredCanvasID = 'imageCanvas' + bodyRegionId; | ||
5004 | + //var coloredCanvas = document.getElementById(coloredCanvasID); | ||
5074 | 5005 | ||
5075 | var width = value.Width; | 5006 | var width = value.Width; |
5076 | var ht = value.Height; | 5007 | var ht = value.Height; |
@@ -5382,7 +5313,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5382,7 +5313,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5382 | $('#spinner').css('visibility', 'visible'); | 5313 | $('#spinner').css('visibility', 'visible'); |
5383 | 5314 | ||
5384 | $rootScope.isViewChange = true; | 5315 | $rootScope.isViewChange = true; |
5385 | - $rootScope.layerNumber = 0; | 5316 | + $scope.layerNumber = 0; |
5386 | // debugger; | 5317 | // debugger; |
5387 | var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; | 5318 | var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; |
5388 | $rootScope.viewOrientationId = selectedViewId; | 5319 | $rootScope.viewOrientationId = selectedViewId; |
@@ -5522,9 +5453,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5522,9 +5453,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5522 | //console.log('reloadDABodyViewEvent'); | 5453 | //console.log('reloadDABodyViewEvent'); |
5523 | 5454 | ||
5524 | $scope.ReloadBodyViewId = data.reloadDABodyViewId; | 5455 | $scope.ReloadBodyViewId = data.reloadDABodyViewId; |
5525 | - // $rootScope.layerNumber = 0; | 5456 | + // $scope.layerNumber = 0; |
5526 | // debugger; | 5457 | // debugger; |
5527 | - var layerNumber = $rootScope.layerNumber | 5458 | + |
5528 | console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); | 5459 | console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); |
5529 | 5460 | ||
5530 | if ($rootScope.isSettingEventAlredayDispachted == true) { | 5461 | if ($rootScope.isSettingEventAlredayDispachted == true) { |
@@ -5545,7 +5476,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5545,7 +5476,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5545 | $rootScope.voId = currentBodyViewId; | 5476 | $rootScope.voId = currentBodyViewId; |
5546 | 5477 | ||
5547 | $scope.skinTone = $rootScope.globalSetting.ethnicity; | 5478 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
5548 | - if($scope.NavigatorData!=null || $scope.NavigatorData!=undefined){ | 5479 | + |
5549 | var navdtlOrient = new jinqJs() | 5480 | var navdtlOrient = new jinqJs() |
5550 | .from($scope.NavigatorData.Navigtor.ViewOrientation) | 5481 | .from($scope.NavigatorData.Navigtor.ViewOrientation) |
5551 | .where("_ViewOrientationId == " + $scope.voId) | 5482 | .where("_ViewOrientationId == " + $scope.voId) |
@@ -5579,7 +5510,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5579,7 +5510,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5579 | } | 5510 | } |
5580 | } | 5511 | } |
5581 | } | 5512 | } |
5582 | - } | ||
5583 | 5513 | ||
5584 | //Annotation tool event lsitener | 5514 | //Annotation tool event lsitener |
5585 | 5515 | ||
@@ -5593,7 +5523,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5593,7 +5523,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5593 | $scope.$on('annotationToolEvent', function (event, data) { | 5523 | $scope.$on('annotationToolEvent', function (event, data) { |
5594 | $("#canvas").css("display", "block"); | 5524 | $("#canvas").css("display", "block"); |
5595 | $("#canvasPaint").css("display", "block"); | 5525 | $("#canvasPaint").css("display", "block"); |
5596 | - // $rootScope.FreeStylePaint(); | 5526 | + // $rootScope.FreeStylePaint(); |
5597 | $scope.doClick(); | 5527 | $scope.doClick(); |
5598 | }); | 5528 | }); |
5599 | $scope.mousePs; | 5529 | $scope.mousePs; |
@@ -6173,7 +6103,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -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 | $rootScope.fontSizes; | 6108 | $rootScope.fontSizes; |
6179 | $rootScope.fontWeight; | 6109 | $rootScope.fontWeight; |
@@ -6184,8 +6114,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6184,8 +6114,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6184 | $rootScope.textArea; | 6114 | $rootScope.textArea; |
6185 | $rootScope.fontFamily; | 6115 | $rootScope.fontFamily; |
6186 | $rootScope.saveText = function () { | 6116 | $rootScope.saveText = function () { |
6187 | - | ||
6188 | - $rootScope.fontSizes = $("#text_area").css("font-size"); | 6117 | + |
6118 | + $rootScope.fontSizes = $("#text_area").css("font-size"); | ||
6189 | $rootScope.fontWeight = $("#text_area").css("font-weight"); | 6119 | $rootScope.fontWeight = $("#text_area").css("font-weight"); |
6190 | $rootScope.fontStyle = $("#text_area").css("font-style"); | 6120 | $rootScope.fontStyle = $("#text_area").css("font-style"); |
6191 | $rootScope.textAlignmt = $("#text_area").css("text-align"); | 6121 | $rootScope.textAlignmt = $("#text_area").css("text-align"); |
@@ -6195,11 +6125,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6195,11 +6125,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6195 | $rootScope.textArea = $("#text_area").val(); | 6125 | $rootScope.textArea = $("#text_area").val(); |
6196 | $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); | 6126 | $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); |
6197 | $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | 6127 | $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
6198 | - | 6128 | + |
6199 | $('#canvas').drawText({ | 6129 | $('#canvas').drawText({ |
6200 | layer: true, | 6130 | layer: true, |
6201 | draggable: true, | 6131 | draggable: true, |
6202 | - name:'TextArea_'+ $rootScope.resetText, | 6132 | + name: 'TextArea_' + $rootScope.resetText, |
6203 | groups: ['TextArea_' + $rootScope.resetText], | 6133 | groups: ['TextArea_' + $rootScope.resetText], |
6204 | dragGroups: ['TextArea_' + $rootScope.resetText], | 6134 | dragGroups: ['TextArea_' + $rootScope.resetText], |
6205 | fillStyle: $rootScope.fontColor, | 6135 | fillStyle: $rootScope.fontColor, |
@@ -6212,16 +6142,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6212,16 +6142,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6212 | x: $scope.offsetX1, y: $scope.offsetY1, | 6142 | x: $scope.offsetX1, y: $scope.offsetY1, |
6213 | maxWidth: $scope.x - $scope.offsetX1, | 6143 | maxWidth: $scope.x - $scope.offsetX1, |
6214 | maxHeight: $scope.y - $scope.offsetY1, | 6144 | maxHeight: $scope.y - $scope.offsetY1, |
6215 | - | 6145 | + |
6216 | click: function (layer) { | 6146 | click: function (layer) { |
6217 | - | ||
6218 | 6147 | ||
6219 | - | 6148 | + |
6149 | + | ||
6220 | }, | 6150 | }, |
6221 | change: function (layer, props) { | 6151 | change: function (layer, props) { |
6222 | 6152 | ||
6223 | } | 6153 | } |
6224 | - | 6154 | + |
6225 | }) | 6155 | }) |
6226 | // Draw rect as wide as the text | 6156 | // Draw rect as wide as the text |
6227 | .drawRect({ | 6157 | .drawRect({ |
@@ -6238,19 +6168,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6238,19 +6168,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6238 | 6168 | ||
6239 | click: function (layer) { | 6169 | click: function (layer) { |
6240 | $rootScope.shapeTypeText = "textAreaRect"; | 6170 | $rootScope.shapeTypeText = "textAreaRect"; |
6241 | - | 6171 | + |
6242 | var layerNameSplit = layer.name; | 6172 | var layerNameSplit = layer.name; |
6243 | - | 6173 | + |
6244 | var splitedName = layerNameSplit.split("_"); | 6174 | var splitedName = layerNameSplit.split("_"); |
6245 | - | 6175 | + |
6246 | var textValName = "TextArea_"; | 6176 | var textValName = "TextArea_"; |
6247 | - | 6177 | + |
6248 | var concatinateResult = textValName.concat(splitedName[1]); | 6178 | var concatinateResult = textValName.concat(splitedName[1]); |
6249 | - | 6179 | + |
6250 | $rootScope.canvasLayerNameCollection = []; | 6180 | $rootScope.canvasLayerNameCollection = []; |
6251 | $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | 6181 | $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); |
6252 | - | ||
6253 | - | 6182 | + |
6183 | + | ||
6254 | 6184 | ||
6255 | $('#canvas').setLayer(layer.name, { | 6185 | $('#canvas').setLayer(layer.name, { |
6256 | handle: { | 6186 | handle: { |
@@ -6265,7 +6195,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6265,7 +6195,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6265 | 6195 | ||
6266 | }, | 6196 | }, |
6267 | mouseout: function (layer) { | 6197 | mouseout: function (layer) { |
6268 | - | 6198 | + |
6269 | $rootScope.canvasLayerNameCollection = []; | 6199 | $rootScope.canvasLayerNameCollection = []; |
6270 | $('#canvas').setLayer(layer.name, { | 6200 | $('#canvas').setLayer(layer.name, { |
6271 | handle: { | 6201 | handle: { |
@@ -6281,7 +6211,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6281,7 +6211,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6281 | 6211 | ||
6282 | }, | 6212 | }, |
6283 | mouseover: function (layer) { | 6213 | mouseover: function (layer) { |
6284 | - | 6214 | + |
6285 | $('#canvas').setLayer(layer.name, { | 6215 | $('#canvas').setLayer(layer.name, { |
6286 | handle: { | 6216 | handle: { |
6287 | type: 'rectangle', | 6217 | type: 'rectangle', |
@@ -6296,25 +6226,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6296,25 +6226,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6296 | } | 6226 | } |
6297 | }); | 6227 | }); |
6298 | $("#text_area").val(''); | 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 | function OnPaintCanvasMouseMove(event) { | 6236 | function OnPaintCanvasMouseMove(event) { |
6307 | 6237 | ||
6308 | - | 6238 | + |
6309 | } | 6239 | } |
6310 | 6240 | ||
6311 | $rootScope.FreeStylePaint = function (e) { | 6241 | $rootScope.FreeStylePaint = function (e) { |
6312 | // debugger; | 6242 | // debugger; |
6313 | 6243 | ||
6314 | - // alert("asasssas"); | 6244 | + // alert("asasssas"); |
6315 | $rootScope.shapeType = "FreeStylePaint"; | 6245 | $rootScope.shapeType = "FreeStylePaint"; |
6316 | canvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false); | 6246 | canvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false); |
6317 | - | 6247 | + |
6318 | } | 6248 | } |
6319 | 6249 | ||
6320 | $(document).keydown(function (event) { | 6250 | $(document).keydown(function (event) { |
@@ -6656,7 +6586,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6656,7 +6586,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6656 | 6586 | ||
6657 | if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | 6587 | if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { |
6658 | $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); | 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,7 +6601,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6671 | var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item; | 6601 | var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item; |
6672 | 6602 | ||
6673 | //var systemListHtml = '<option value="0" selected="">All</option>' | 6603 | //var systemListHtml = '<option value="0" selected="">All</option>' |
6674 | - $('#bodySystems').empty(); | ||
6675 | 6604 | ||
6676 | var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems'); | 6605 | var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems'); |
6677 | $compile($all)($scope); | 6606 | $compile($all)($scope); |
@@ -6707,7 +6636,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6707,7 +6636,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6707 | 6636 | ||
6708 | // var TermTextList = []; | 6637 | // var TermTextList = []; |
6709 | // var TermTextList = []; | 6638 | // var TermTextList = []; |
6710 | - $('#termList').empty(); | 6639 | + |
6711 | $scope.loadListManger(); | 6640 | $scope.loadListManger(); |
6712 | 6641 | ||
6713 | 6642 | ||
@@ -6769,6 +6698,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6769,6 +6698,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6769 | }) | 6698 | }) |
6770 | 6699 | ||
6771 | 6700 | ||
6701 | + | ||
6772 | $scope.VocabTermTxt = new jinqJs() | 6702 | $scope.VocabTermTxt = new jinqJs() |
6773 | .from(vocabTermTxt) | 6703 | .from(vocabTermTxt) |
6774 | .distinct('_TermText', '_ActualTermNumber') | 6704 | .distinct('_TermText', '_ActualTermNumber') |
@@ -6792,7 +6722,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6792,7 +6722,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6792 | } | 6722 | } |
6793 | // }) | 6723 | // }) |
6794 | 6724 | ||
6795 | - | 6725 | + |
6796 | //.error(function (data, status, headers, config) { | 6726 | //.error(function (data, status, headers, config) { |
6797 | 6727 | ||
6798 | // console.log(data); | 6728 | // console.log(data); |
@@ -6850,7 +6780,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6850,7 +6780,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6850 | layerNumber = parseInt(layerNumber) - 1; | 6780 | layerNumber = parseInt(layerNumber) - 1; |
6851 | } | 6781 | } |
6852 | 6782 | ||
6853 | - $rootScope.layerNumber = layerNumber; | 6783 | + $scope.layerNumber = layerNumber; |
6854 | 6784 | ||
6855 | //4.get scroll position | 6785 | //4.get scroll position |
6856 | if (actualTermNumber != DA[0].SKIN_TERM_ID) { | 6786 | if (actualTermNumber != DA[0].SKIN_TERM_ID) { |
@@ -6891,8 +6821,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -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 | //8.remove current layer canavses | 6827 | //8.remove current layer canavses |
6898 | $scope.flushCanvas(); | 6828 | $scope.flushCanvas(); |