Commit 784d99f90e0ffb31d8e159b4a91612ed65b5d141

Authored by Mitali Srivastava
1 parent 9ac40e25

merged with blackIssueInTb

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1   -
2   -'use strict';
  1 +'use strict';
3 2  
4 3 AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService",
5 4 function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) {
... ... @@ -91,6 +90,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
91 90 $scope.navigatorImage;
92 91 $scope.NavigatorData;
93 92 $scope.navimgsrc;
  93 + $scope.isCanvasImageLoaded;
94 94  
95 95 $scope.dragdivleft = 0;
96 96 $scope.dragdivtop = 0;
... ... @@ -369,7 +369,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
369 369 if ($rootScope.openViews.length > 0) {
370 370 openViews = new jinqJs()
371 371 .from($rootScope.openViews)
372   - .where("BodyViewId == " + currentBodyViewId)
  372 + .where("BodyViewId==" + currentBodyViewId)
373 373 .select();
374 374 }
375 375 }
... ... @@ -381,7 +381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
381 381 if (openViews != null && openViews != undefined) {
382 382 angular.forEach(openViews, function (value, key) {
383 383  
384   - if (value.body-views == tittle) {
  384 + if (value.body - views == tittle) {
385 385 tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
386 386 $rootScope.currentActiveViewTitle = tittle;
387 387 localStorage.setItem("currentViewTitle", tittle);
... ... @@ -718,8 +718,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
718 718 $scope.ColoredImageSRC = [];
719 719 }
720 720  
721   - if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) {
722   - angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
  721 + if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined)
  722 + {
  723 + angular.forEach($scope.bodyRegionCoordinates, function (value, key)
  724 + {
723 725  
724 726 if (value._HaveMirrorImage == 'Y') {
725 727  
... ... @@ -732,7 +734,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
732 734 var src = $scope.GetImageSource(value._BodyRegionId);
733 735  
734 736 $scope.imageSource = src;
735   -
  737 +
736 738 //2.Draw mirror image
737 739 $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
738 740 // debugger;
... ... @@ -755,7 +757,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
755 757 //0. Scaling as per default zoom
756 758 var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0);
757 759  
758   -
  760 +
759 761 //1.Draw body region which have mirror image
760 762 $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
761 763 $scope.BodyRegionCordinatesData.push(
... ... @@ -771,7 +773,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
771 773  
772 774 }
773 775 else {
774   -
  776 +
775 777 //0.Scaling as per default zoom
776 778 var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
777 779  
... ... @@ -785,6 +787,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
785 787 $scope.imageSource = src;
786 788 }
787 789  
  790 +
788 791 //2.Draw body region which don't have mirror image
789 792 $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
790 793  
... ... @@ -810,7 +813,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
810 813 var gender;
811 814 if (localStorage.getItem("genderId") == 'Female') {
812 815 gender = 'F';
813   -
814 816 }
815 817 else {
816 818 gender = 'M';
... ... @@ -991,7 +993,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
991 993 }
992 994  
993 995  
994   -
995 996 $scope.GetImageSource = function (bodyRegionId) {
996 997 // debugger;
997 998 var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
... ... @@ -1146,7 +1147,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1146 1147 FlipedImgCanvas.addEventListener('click', function (evt) {
1147 1148  
1148 1149 //to get correct data on multihighlight highlight
1149   - if ($scope.isLayerChange == true) {
  1150 + if($scope.isLayerChange == true)
  1151 + {
1150 1152 $scope.isLayerChange = false;
1151 1153 }
1152 1154  
... ... @@ -1427,7 +1429,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1427 1429 $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
1428 1430  
1429 1431 var imgCanvas = document.createElement('canvas');
1430   -
  1432 +
1431 1433 imgCanvas.height = h;
1432 1434 imgCanvas.width = w;
1433 1435 imgCanvas.setAttribute("data-IsMirrored", "N")
... ... @@ -1813,7 +1815,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1813 1815 else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
1814 1816 loopLength = 1;
1815 1817 }
1816   -
  1818 +
1817 1819 if (loopLength !== 0) {
1818 1820 for (var x = 0; x < loopLength; x++) {
1819 1821 if ($rootScope.MaskCanvasData[x] != null || $rootScope.MaskCanvasData[x] != undefined) {
... ... @@ -1917,7 +1919,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1917 1919 grayCanvasContext.putImageData(imgData, 0, 0);
1918 1920 }
1919 1921  
1920   -
  1922 +
1921 1923 if ($rootScope.multiAnnotationIsON == true) {
1922 1924 //debugger;
1923 1925 if (canvasId.match('_MR'))
... ... @@ -1960,14 +1962,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1960 1962  
1961 1963 $scope.HighlightBodyByTermList = function (TermList) {
1962 1964  
1963   - //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) {
1964   - // $rootScope.updatedGrayMRDataList = null;
1965   - // $rootScope.updatedGrayMRDataList = [];
1966   - //}
1967   - //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) {
1968   - // $rootScope.updatedGrayDataList = null;
1969   - // $rootScope.updatedGrayDataList = [];
1970   - //}
1971 1965  
1972 1966 console.log('HighlightBodyByTermList is called');
1973 1967  
... ... @@ -2058,7 +2052,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2058 2052 if ($scope.isLayerChange == true) {
2059 2053 if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) {
2060 2054 grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1];
2061   -
  2055 +
2062 2056 }
2063 2057  
2064 2058 } else {
... ... @@ -2142,15 +2136,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2142 2136 if (canvasId.match('_MR')) {
2143 2137 $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData;
2144 2138  
2145   - //alert('HighlightBodyByTermList, is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON);
2146   -
2147   - //$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData;
2148 2139 }
2149 2140 else
2150 2141 $rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData;
2151 2142  
2152   - //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId });
2153   -
  2143 +
2154 2144 console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length)
2155 2145  
2156 2146 if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) {
... ... @@ -2195,6 +2185,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2195 2185  
2196 2186  
2197 2187  
  2188 +
  2189 +
2198 2190 $scope.createTermListByPreviousTermsAndHighlight = function () {
2199 2191  
2200 2192  
... ... @@ -2218,13 +2210,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2218 2210  
2219 2211 console.log('createTermListByPreviousTermsAndHighlight is called');
2220 2212  
2221   - if ((multiTermList != undefined || multiTermList != null) && multiTermList.length > 0) {
  2213 + if ((multiTermList != undefined || multiTermList!=null) && multiTermList.length>0) {
2222 2214  
2223 2215 $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50);
2224 2216 }
2225 2217 }
2226 2218  
2227 2219  
  2220 +
2228 2221 $scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) {
2229 2222 var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1);
2230 2223  
... ... @@ -2328,11 +2321,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2328 2321 //layer change function
2329 2322 $scope.LayerChange = function () {
2330 2323  
2331   - //remove annotation
2332   -
2333   -
2334   -
2335   -
2336 2324 $scope.isLayerChange = true;
2337 2325 $rootScope.isLoading = true;
2338 2326 $('#spinner').css('visibility', 'visible');
... ... @@ -2588,7 +2576,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2588 2576 else {
2589 2577 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length)
2590 2578 }
2591   - if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){
  2579 +
2592 2580 if ($scope.longestAnnotation.length <= 10) {
2593 2581  
2594 2582  
... ... @@ -2647,8 +2635,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2647 2635  
2648 2636  
2649 2637 }
2650   -
2651   - }
2652 2638 var Globe = [];
2653 2639 Globe.push({ currentX: x, currentY: y });
2654 2640  
... ... @@ -3782,20 +3768,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3782 3768 }
3783 3769  
3784 3770  
3785   - //check if transparency is activated
  3771 + // niki 3june
  3772 + //var txtTransparencyChange = document.getElementById("txtTransparencyChange");
  3773 + ////for first time, the transparency should be 50%
  3774 + //if ($scope.isTboxDrwan) {
  3775 +
  3776 + // if (txtTransparencyChange != null)
  3777 + // txtTransparencyChange.value = 50;
  3778 +
  3779 + // $scope.isTboxDrwan = false;
  3780 +
  3781 + //}
  3782 +
  3783 + //check if transparency is activated
3786 3784  
3787 3785  
3788 3786 var transNumber = $scope.transNumber;//txtTransparencyChange.value;
3789 3787 // debugger;
3790   - //this changes the transparency when transparency is already activated and user resizes or chage the layer
  3788 + //this changes the transparency when transparency is already activated(on scale the value is >0) and user resizes or chage the layer
3791 3789  
3792 3790 var imageD = tempCtx.getImageData(0, 0, Width, Height);
3793 3791  
3794   -
  3792 + if (transNumber > 0) {
  3793 + // debugger;
  3794 +
  3795 +
  3796 + // tempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;
3795 3797 var tempCtx = document.getElementById(tempCanvasID).getContext('2d');
3796 3798  
  3799 + // var image = ctx.getImageData(0, 0, scope.transparencyCanvasWidth, scope.transparencyCanvasHeight);
  3800 +
  3801 +
3797 3802 //keep the original image on temp canavs to use it in changing transparency
3798   -
  3803 + // if (scope.isResized == true || scope.isLayerChanged) {
  3804 + //debugger;
  3805 +
3799 3806 if (document.getElementById('tempCanvas') != null) {
3800 3807 var contx = document.getElementById('tempCanvas').getContext('2d');
3801 3808 var tbTempCanvas = document.getElementById(tempCanvasID)
... ... @@ -3830,7 +3837,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3830 3837  
3831 3838 tempCtx.putImageData(imageD, 0, 0);
3832 3839  
3833   -
  3840 + }
  3841 +
3834 3842 var ctx = transparencyCanvas.getContext('2d');
3835 3843  
3836 3844  
... ... @@ -4487,11 +4495,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4487 4495  
4488 4496 $scope.enableZoom = function () {
4489 4497  
4490   - //remove speech bubble
4491   - $('#sppeachBubble').css('display', 'none');
4492   -
4493   - $("#dot").css("display", "none");
4494   -
4495 4498 $scope.terminateCurrentlyRunningWPs();
4496 4499  
4497 4500 if ($scope.isTransparencyActivated) {
... ... @@ -4540,30 +4543,54 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4540 4543  
4541 4544 $scope.flushCanvas = function () {
4542 4545  
4543   - //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
4544   - // angular.forEach($scope.ColoredImageSRC, function (value, key) {
  4546 + if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
  4547 + angular.forEach($scope.ColoredImageSRC, function (value, key) {
4545 4548  
4546   - // var id;
4547   - // var maskId;
4548   - // if (value.haveMirror == 'true') {
4549   - // id = 'imageCanvas' + value.bodyRegionId + '_MR';
4550   - // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
4551   - // }
4552   - // else {
4553   - // id = 'imageCanvas' + value.bodyRegionId;
4554   - // maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
4555   - // }
  4549 + var id;
  4550 + var maskId;
  4551 + if (value.haveMirror == 'true') {
  4552 + id = 'imageCanvas' + value.bodyRegionId + '_MR';
  4553 + maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
  4554 + }
  4555 + else {
  4556 + id = 'imageCanvas' + value.bodyRegionId;
  4557 + maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
  4558 + }
4556 4559  
4557   - // var canvas = document.getElementById(id);
4558   - // if (canvas != null || canvas != undefined) {
4559   - // document.getElementById('canvasDiv').removeChild(canvas);
4560   - // }
  4560 + var canvas = document.getElementById(id);
  4561 + if (canvas != null || canvas != undefined) {
  4562 + document.getElementById('canvasDiv').removeChild(canvas);
  4563 + }
4561 4564  
4562   - // var maskcanvas = document.getElementById(maskId);
4563   - // if (maskcanvas != null || maskcanvas != undefined) {
4564   - // document.getElementById('canvasDiv').removeChild(maskcanvas);
  4565 + var maskcanvas = document.getElementById(maskId);
  4566 + if (maskcanvas != null || maskcanvas != undefined) {
  4567 + document.getElementById('canvasDiv').removeChild(maskcanvas);
  4568 +
  4569 + }
  4570 +
  4571 + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  4572 + for (var i = 0; i < modestyCanvases.length; i++) {
  4573 + modestyCanvases[i].remove();
  4574 + }
  4575 + });
  4576 + }
  4577 +
  4578 + //for (var i = 1; i < 7; i++) {
  4579 +
  4580 + // var id;
  4581 + // var maskId;
  4582 +
  4583 + // id = 'imageCanvas' + i;
  4584 + // maskId = 'imageCanvas' + i + '_mci';
  4585 +
  4586 + // var canvas = document.getElementById(id);
  4587 + // if (canvas != null || canvas != undefined)
  4588 + // document.getElementById('canvasDiv').removeChild(canvas);
  4589 +
  4590 + // var maskcanvas = document.getElementById(maskId);
  4591 + // if (maskcanvas != null || maskcanvas != undefined)
  4592 + // document.getElementById('canvasDiv').removeChild(maskcanvas);
4565 4593  
4566   - // }
4567 4594 // if (i == 4 || i == 5 || i == 6) {
4568 4595 // id = 'imageCanvas' + i + '_MR';
4569 4596 // maskId = 'imageCanvas' + i + '_MR_mci';
... ... @@ -4577,11 +4604,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4577 4604 // document.getElementById('canvasDiv').removeChild(maskcanvas);
4578 4605 // }
4579 4606  
4580   - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4581   - // for (var i = 0; i < modestyCanvases.length; i++) {
4582   - // modestyCanvases[i].remove();
4583   - // }
4584   - // });
4585 4607 // //remove modesty canavs
4586 4608 // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4587 4609 // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
... ... @@ -4590,44 +4612,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4590 4612 // }
4591 4613 // }
4592 4614 //}
4593   -
4594   - for (var i = 1; i < 7; i++) {
4595   -
4596   - var id;
4597   - var maskId;
4598   -
4599   - id = 'imageCanvas' + i;
4600   - maskId = 'imageCanvas' + i + '_mci';
4601   -
4602   - var canvas = document.getElementById(id);
4603   - if (canvas != null || canvas != undefined)
4604   - document.getElementById('canvasDiv').removeChild(canvas);
4605   -
4606   - var maskcanvas = document.getElementById(maskId);
4607   - if (maskcanvas != null || maskcanvas != undefined)
4608   - document.getElementById('canvasDiv').removeChild(maskcanvas);
4609   -
4610   - if (i == 4 || i == 5 || i == 6) {
4611   - id = 'imageCanvas' + i + '_MR';
4612   - maskId = 'imageCanvas' + i + '_MR_mci';
4613   -
4614   - var canvas = document.getElementById(id);
4615   - if (canvas != null || canvas != undefined)
4616   - document.getElementById('canvasDiv').removeChild(canvas);
4617   -
4618   - var maskcanvas = document.getElementById(maskId);
4619   - if (maskcanvas != null || maskcanvas != undefined)
4620   - document.getElementById('canvasDiv').removeChild(maskcanvas);
4621   - }
4622   -
4623   - //remove modesty canavs
4624   - var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4625   - if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
4626   - for (var j = 0; j < modestyCanvases.length; j++) {
4627   - modestyCanvases[j].remove();
4628   - }
4629   - }
4630   - }
4631 4615 }
4632 4616  
4633 4617 $scope.terminateCurrentlyRunningWPs = function () {
... ... @@ -4767,7 +4751,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4767 4751  
4768 4752 $scope.highLightBody = function () {
4769 4753  
4770   - console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length);
  4754 + // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId);
4771 4755  
4772 4756 $scope.terminateCurrentlyRunningWPs();
4773 4757  
... ... @@ -4790,14 +4774,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4790 4774 $scope.doHighlightOrExtract = false;
4791 4775 }
4792 4776  
4793   -
  4777 + console.log('$scope.doHighlightOrExtract= ' + $scope.doHighlightOrExtract)
4794 4778 if ($scope.doHighlightOrExtract == true) {
4795 4779 if ($rootScope.isHighLight == true) {
4796 4780  
4797 4781 $scope.grayedBR = [];
4798 4782  
4799 4783 angular.forEach($scope.ColoredImageSRC, function (value, key) {
4800   - console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length)
4801 4784 var id;
4802 4785 if (value.haveMirror == 'true') {
4803 4786 id = 'imageCanvas' + value.bodyRegionId + '_MR';
... ... @@ -4837,8 +4820,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4837 4820 img.src = dataURL;
4838 4821  
4839 4822 img.onload = function () {
4840   - console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= '
4841   - + value.bodyRegionId)
  4823 +
4842 4824  
4843 4825 var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
4844 4826 DAData.draw(img);
... ... @@ -4856,25 +4838,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4856 4838  
4857 4839 DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
4858 4840  
4859   -
  4841 +
4860 4842 context_gray.putImageData(DAData.data, 0, 0)
  4843 +
  4844 + // to resolve lateral arm black issue in highlight mode
4861 4845  
4862   - //NIKI- to resolve lateral arm black issue in highlight mode
4863   -
4864   - if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) {
4865   -
  4846 + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) {
  4847 +
4866 4848 var imgData = context_gray.getImageData(0, 0, width, ht);
4867 4849 var data = imgData.data;
4868   - var c = 0;
  4850 + var c=0;
4869 4851 for (var i = 0; i < data.length; i += 4) {
4870 4852 if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) {
4871 4853 data[i + 3] = 0;
4872 4854 }
4873   -
  4855 +
4874 4856 }
4875 4857 context_gray.putImageData(imgData, 0, 0);
4876 4858 }
4877   -
  4859 +
  4860 + //
4878 4861 //push BRID into array
4879 4862 $scope.grayedBR.push({ 'BRID': value.bodyRegionId });
4880 4863  
... ... @@ -4926,22 +4909,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4926 4909  
4927 4910 if ($scope.isEligibleForHighlightBodyByTermList == true) {
4928 4911 //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
4929   - // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
  4912 + if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
4930 4913 $scope.isLoading = false;
4931 4914  
4932 4915 $('#spinner').css('visibility', 'hidden');
4933   - //}
  4916 + }
4934 4917  
4935 4918 if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
4936 4919  
4937   - $scope.isLoading = true;
4938   -
4939   - $('#spinner').css('visibility', 'visible');
4940 4920 $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
4941 4921 }
4942   - else if ($rootScope.isListManagerSelected == true) {
  4922 + else if ($scope.isHighlightByListManager == true) {
4943 4923  
4944   - // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
4945 4924 $timeout(function () {
4946 4925  
4947 4926 $scope.HighlightBodyByTermList($scope.AllTerms)
... ... @@ -4951,6 +4930,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4951 4930 else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4952 4931 $scope.createTermListByPreviousTermsAndHighlight();
4953 4932 }
  4933 +
4954 4934  
4955 4935 }
4956 4936  
... ... @@ -4963,11 +4943,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4963 4943  
4964 4944 if ($rootScope.isExtract == true) {
4965 4945 if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4966   -
  4946 + console.log('HighlightBodyOnExtract')
4967 4947 $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
4968 4948 }
4969 4949 }
4970 4950 //else {
  4951 + // console.log('INSIDE ELSE. $scope.grayedBR.length= ' + $scope.grayedBR.length)
4971 4952 // // 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
4972 4953 // //and then highlight the previously selected body regions at the time of normal mode.
4973 4954 // if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
... ... @@ -4986,12 +4967,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4986 4967  
4987 4968  
4988 4969 // }
4989   -
  4970 + // console.log('INSIDE ELSE $scope.isEligibleForHighlightBodyByTermList = ' + $scope.isEligibleForHighlightBodyByTermList)
4990 4971 // //
4991 4972 //}
4992 4973 })
4993   -
  4974 +
4994 4975 //if ($scope.isEligibleForHighlightBodyByTermList == true) {
  4976 + // console.log('CREATE multiTermList')
  4977 +
4995 4978 // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4996 4979  
4997 4980 // var multiTermList = [];
... ... @@ -5034,8 +5017,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5034 5017  
5035 5018 var imageCanvas = document.getElementById(id);
5036 5019  
5037   - //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
5038   - //var coloredCanvas = document.getElementById(coloredCanvasID);
5039 5020  
5040 5021 var width = value.Width;
5041 5022 var ht = value.Height;
... ... @@ -5212,17 +5193,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5212 5193 //1.
5213 5194 localStorage.setItem("genderId", 'Male');
5214 5195  
  5196 + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female', 'Male');
  5197 +
  5198 + localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Female', 'Male'));
  5199 +
5215 5200 //2.
5216 5201 $scope.loadSelectedBodyView(currentBodyViewId);
5217 5202  
5218 5203 //3.
5219 5204 $scope.loadSelectedBodyViewNavigator(currentBodyViewId);
5220   -
5221   -
5222   - $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female', 'Male');
5223   -
5224   - localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Female', 'Male'));
5225   -
  5205 +
5226 5206  
5227 5207 $rootScope.isLoading = true;
5228 5208  
... ... @@ -5230,22 +5210,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5230 5210  
5231 5211 else if ((event.currentTarget.attributes[1].value == 'Female') && (localStorage.getItem("genderId") == 'Male')) {
5232 5212  
5233   - localStorage.setItem("genderId", 'Female');
5234   -
5235 5213 //1.
5236   - $scope.loadSelectedBodyView(currentBodyViewId);
  5214 + localStorage.setItem("genderId", 'Female');
  5215 + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male', 'Female');
  5216 + localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Male', 'Female'));
5237 5217  
5238 5218 //2.
5239   - $scope.loadSelectedBodyViewNavigator(currentBodyViewId);
  5219 + $scope.loadSelectedBodyView(currentBodyViewId);
5240 5220  
5241 5221 //3.
5242   - $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male', 'Female');
5243   -
5244   - localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Male', 'Female'));
  5222 + $scope.loadSelectedBodyViewNavigator(currentBodyViewId);
5245 5223  
5246 5224  
5247 5225 $rootScope.isLoading = true;
5248 5226  
  5227 +
5249 5228 }
5250 5229  
5251 5230 $rootScope.openViews.push(
... ... @@ -5346,11 +5325,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5346 5325 $rootScope.isLoading = true;
5347 5326 $('#spinner').css('visibility', 'visible');
5348 5327  
5349   -
5350   - if ($rootScope.openViews.length > 0) {
5351   - $rootScope.openViews.splice($rootScope.openViews.length - 1);
5352   - }
5353   -
5354 5328 $rootScope.isViewChange = true;
5355 5329 $scope.layerNumber = 0;
5356 5330 // debugger;
... ... @@ -5368,15 +5342,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5368 5342 $rootScope.voId = selectedViewId;
5369 5343 $rootScope.isLoading = true;
5370 5344  
5371   - //1. Load selected body view
5372   - $scope.loadSelectedBodyView($rootScope.voId);
  5345 + //1.Change the popup title next to search
  5346 + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
  5347 +
  5348 + //2. Load selected body view
  5349 + $scope.loadSelectedBodyView($rootScope.voId);
  5350 + // $scope.loadSelectedBodyView($rootScope.voId);
5373 5351  
5374 5352 //2. load corresponding navigator man
5375 5353 $scope.loadSelectedBodyViewNavigator($rootScope.voId);
5376 5354  
5377   - //3.Change the popup title next to search
5378   - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
5379   -
5380 5355 };
5381 5356  
5382 5357  
... ... @@ -5397,11 +5372,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5397 5372 $rootScope.voId = selectedViewId;
5398 5373 $rootScope.isLoading = true;
5399 5374  
5400   - //1.
  5375 + //1. Load selected body view
5401 5376 $scope.loadSelectedBodyView($rootScope.voId);
5402 5377  
5403   - //2.
  5378 + //2. load corresponding navigator man
5404 5379 $scope.loadSelectedBodyViewNavigator($rootScope.voId);
  5380 +
5405 5381 };
5406 5382  
5407 5383  
... ... @@ -5477,6 +5453,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5477 5453 $scope.LateralArmView = "";
5478 5454 $scope.MedialArmView = "active";
5479 5455 }
  5456 +
  5457 + $rootScope.isLoading = false;
  5458 + $('#spinner').css('visibility', 'hidden');
5480 5459 }
5481 5460  
5482 5461 //Reload DA controller event listener after setting change
... ... @@ -5489,21 +5468,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5489 5468  
5490 5469 //Reload DA controller Body View after setting Change
5491 5470 $scope.$on('reloadDABodyViewEvent', function (event, data) {
5492   - //console.log('reloadDABodyViewEvent');
5493   - $scope.layerNumber = parseInt($('#txtlayerNumber').val());
5494   - $scope.ReloadBodyViewId = data.reloadDABodyViewId;
5495   - // $scope.layerNumber = 0;
5496   - // debugger;
5497   -
5498   - console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId);
  5471 + console.log('reloadDABodyViewEvent');
5499 5472  
5500 5473 if ($rootScope.isSettingEventAlredayDispachted == true) {
5501 5474  
5502   - $scope.loadSelectedBodyView($scope.ReloadBodyViewId);
  5475 + //1. first change the go button popup
  5476 + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
5503 5477  
5504   - $scope.loadSelectedBodyViewNavigator($scope.ReloadBodyViewId);
  5478 + //2. then load Canvas image
  5479 + $scope.loadSelectedBodyView(data.reloadDABodyViewId);
5505 5480  
5506   - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
  5481 + //3.
  5482 + $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId);
5507 5483  
5508 5484 $rootScope.isSettingEventAlredayDispachted = false;
5509 5485 }
... ... @@ -5512,48 +5488,46 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5512 5488  
5513 5489 $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
5514 5490  
5515   - $rootScope.voId = currentBodyViewId;
  5491 + // $rootScope.voId = currentBodyViewId;
5516 5492  
5517   - $scope.skinTone = $rootScope.globalSetting.ethnicity;
5518   -
5519   - if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) {
5520   - var navdtlOrient = new jinqJs()
5521   - .from($scope.NavigatorData.Navigtor.ViewOrientation)
5522   - .where("_ViewOrientationId == " + $scope.voId)
5523   - .select();
  5493 + // $scope.skinTone = $rootScope.globalSetting.ethnicity;
  5494 + console.log('NavBodyView: ' + currentBodyViewId);
  5495 + console.log('Skintone: ' + $rootScope.globalSetting.ethnicity);
  5496 + console.log('Modesty: ' + $rootScope.globalSetting.modesty);
5524 5497  
  5498 + var navdtlOrient = new jinqJs()
  5499 + .from($scope.NavigatorData.Navigtor.ViewOrientation)
  5500 + .where("_ViewOrientationId == " + currentBodyViewId)
  5501 + .select();
  5502 + if (navdtlOrient != null || navdtlOrient != undefined) {
5525 5503  
5526   - if (navdtlOrient != null || navdtlOrient != undefined) {
  5504 + var navOrientationdata = new jinqJs()
  5505 + .from(navdtlOrient[0].ImageInfo)
  5506 + .where("_Ethnicity == " + $rootScope.globalSetting.ethnicity)
  5507 + .select();
5527 5508  
5528   - var navOrientationdata = new jinqJs()
5529   - .from(navdtlOrient[0].ImageInfo)
5530   - .where("_Ethnicity == " + $scope.skinTone)
5531   - .select();
  5509 + if (navOrientationdata != null || navOrientationdata != undefined) {
5532 5510  
5533   - if (navOrientationdata != null || navOrientationdata != undefined) {
  5511 + $scope.navigatorImage = navOrientationdata;
5534 5512  
5535   - $scope.navigatorImage = navOrientationdata;
5536 5513  
  5514 + var navImageModesty;
5537 5515  
5538   - var navImageModesty;
  5516 + angular.forEach($scope.navigatorImage, function (value, key) {
  5517 + if (value._HaveModesty === $rootScope.globalSetting.modesty) {
  5518 + navImageModesty = value._ImageName;
  5519 + }
  5520 + })
  5521 + if (typeof (navImageModesty) === "undefined" || navImageModesty === null) {
5539 5522  
5540   - angular.forEach($scope.navigatorImage, function (value, key) {
5541   - if (value._HaveModesty === $rootScope.globalSetting.modesty) {
5542   - navImageModesty = value._ImageName;
5543   - }
5544   - })
5545   - if (typeof (navImageModesty) === "undefined" || navImageModesty === null) {
  5523 + navImageModesty = $scope.navigatorImage[0]._ImageName;
5546 5524  
5547   - navImageModesty = $scope.navigatorImage[0]._ImageName;
  5525 + }
5548 5526  
5549   - }
  5527 + $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + currentBodyViewId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;
5550 5528  
5551   - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
5552   - }
5553 5529 }
5554   -
5555 5530 }
5556   -
5557 5531 }
5558 5532  
5559 5533 //Annotation tool event lsitener
... ... @@ -5681,8 +5655,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5681 5655 layer: true,
5682 5656 type: 'line',
5683 5657 draggable: true,
5684   - strokeStyle: $rootScope.shapestyleborderColor,
5685   - strokeWidth: $rootScope.shapestyleborderWidth,
  5658 + strokeStyle: 'black',
  5659 + strokeWidth: 2,
5686 5660 rounded: true,
5687 5661 x1: $scope.offsetX1, y1: $scope.offsetY1,
5688 5662 x2: $scope.x, y2: $scope.y,
... ... @@ -5743,12 +5717,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5743 5717 $('#canvas').addLayer({
5744 5718 layer: true,
5745 5719 name: 'Rect_' + $rootScope.resetRect,
5746   - fillStyle: $rootScope.shapestyleFillColor,
  5720 + fillStyle: '#fff',
5747 5721 type: 'rectangle',
5748 5722 draggable: true,
5749   - strokeStyle: $rootScope.shapestyleborderColor,
  5723 + strokeStyle: 'black',
5750 5724 opacity: $rootScope.shapestyleOpacity,
5751   - strokeWidth: $rootScope.shapestyleborderWidth,
  5725 + strokeWidth: 2,
5752 5726 x: $scope.offsetX1, y: $scope.offsetY1,
5753 5727 width: $scope.x - $scope.offsetX1,
5754 5728 height: $scope.y - $scope.offsetY1,
... ... @@ -5812,7 +5786,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5812 5786 break;
5813 5787  
5814 5788 case "Circle":
5815   - // alert($rootScope.shapestyleFillColor);
  5789 +
5816 5790 $rootScope.resetCircle = $rootScope.ObjectIndex++;
5817 5791 $('#canvas').addLayer({
5818 5792 layer: true,
... ... @@ -5820,9 +5794,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5820 5794 type: 'ellipse',
5821 5795 opacity: $rootScope.shapestyleOpacity,
5822 5796 draggable: true,
5823   - strokeStyle: $rootScope.shapestyleborderColor,
5824   - strokeWidth: $rootScope.shapestyleborderWidth,
5825   - fillStyle: $rootScope.shapestyleFillColor,
  5797 + strokeStyle: '#000',
  5798 + strokeWidth: 2,
  5799 + fillStyle: '#FFF',
5826 5800 x: $scope.offsetX1, y: $scope.offsetY1,
5827 5801 width: ($scope.x - $scope.offsetX1) * 2, height: ($scope.y - $scope.offsetY1) * 2,
5828 5802 // Place a handle at each side and each corner
... ... @@ -5886,8 +5860,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5886 5860 layer: true,
5887 5861 name: 'Arrow_' + $rootScope.resetArrow,
5888 5862 draggable: true,
5889   - strokeStyle: $rootScope.shapestyleborderColor,
5890   - strokeWidth: $rootScope.shapestyleborderWidth,
  5863 + strokeStyle: '#000',
  5864 + strokeWidth: 2,
5891 5865 rounded: true,
5892 5866 startArrow: true,
5893 5867 arrowRadius: 7,
... ... @@ -6089,9 +6063,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6089 6063 name: "TextRect_" + $rootScope.resetTextRect,
6090 6064 dragGroups: ['shapes'],
6091 6065 opacity: $rootScope.shapestyleOpacity,
6092   - strokeStyle: $rootScope.shapestyleborderColor,
6093   - strokeWidth: $rootScope.shapestyleborderWidth,
6094   - fillStyle: $rootScope.shapestyleFillColor,
  6066 + strokeStyle: 'black',
  6067 + strokeWidth: 2,
6095 6068 x: $scope.offsetX1, y: $scope.offsetY1,
6096 6069 width: $scope.x - $scope.offsetX1,
6097 6070 height: $scope.y - $scope.offsetY1,
... ... @@ -6158,7 +6131,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6158 6131  
6159 6132 }
6160 6133  
6161   - //-- TextArea functionality of Annotation toolbar
  6134 + //-- TextArea functionality of Annotation toolbar
6162 6135  
6163 6136 $rootScope.fontSizes;
6164 6137 $rootScope.fontWeight;
... ... @@ -6169,8 +6142,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6169 6142 $rootScope.textArea;
6170 6143 $rootScope.fontFamily;
6171 6144 $rootScope.saveText = function () {
6172   -
6173   - $rootScope.fontSizes = $("#text_area").css("font-size");
  6145 +
  6146 + $rootScope.fontSizes = $("#text_area").css("font-size");
6174 6147 $rootScope.fontWeight = $("#text_area").css("font-weight");
6175 6148 $rootScope.fontStyle = $("#text_area").css("font-style");
6176 6149 $rootScope.textAlignmt = $("#text_area").css("text-align");
... ... @@ -6180,11 +6153,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6180 6153 $rootScope.textArea = $("#text_area").val();
6181 6154 $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers();
6182 6155 $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
6183   - // alert($rootScope.fontColor);
  6156 +
6184 6157 $('#canvas').drawText({
6185 6158 layer: true,
6186 6159 draggable: true,
6187   - name: 'TextArea_' + $rootScope.resetText,
  6160 + name:'TextArea_'+ $rootScope.resetText,
6188 6161 groups: ['TextArea_' + $rootScope.resetText],
6189 6162 dragGroups: ['TextArea_' + $rootScope.resetText],
6190 6163 fillStyle: $rootScope.fontColor,
... ... @@ -6197,16 +6170,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6197 6170 x: $scope.offsetX1, y: $scope.offsetY1,
6198 6171 maxWidth: $scope.x - $scope.offsetX1,
6199 6172 maxHeight: $scope.y - $scope.offsetY1,
6200   -
  6173 +
6201 6174 click: function (layer) {
  6175 +
6202 6176  
6203   -
6204   -
  6177 +
6205 6178 },
6206 6179 change: function (layer, props) {
6207 6180  
6208 6181 }
6209   -
  6182 +
6210 6183 })
6211 6184 // Draw rect as wide as the text
6212 6185 .drawRect({
... ... @@ -6216,30 +6189,27 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6216 6189 groups: ['TextArea_' + $rootScope.resetText],
6217 6190 dragGroups: ['TextArea_' + $rootScope.resetText],
6218 6191 opacity: $rootScope.shapestyleOpacity,
6219   - // strokeStyle: 'black',
6220   - // strokeWidth: 2,
6221   - strokeStyle: $rootScope.shapestyleborderColor,
6222   - strokeWidth: $rootScope.shapestyleborderWidth,
6223   - // fillStyle: $rootScope.shapestyleFillColor,
  6192 + strokeStyle: 'black',
  6193 + strokeWidth: 2,
6224 6194 x: $scope.offsetX1, y: $scope.offsetY1,
6225 6195 width: $scope.x - $scope.offsetX1,
6226 6196 height: $scope.y - $scope.offsetY1,
6227 6197  
6228 6198 click: function (layer) {
6229 6199 $rootScope.shapeTypeText = "textAreaRect";
6230   -
  6200 +
6231 6201 var layerNameSplit = layer.name;
6232   -
  6202 +
6233 6203 var splitedName = layerNameSplit.split("_");
6234   -
  6204 +
6235 6205 var textValName = "TextArea_";
6236   -
  6206 +
6237 6207 var concatinateResult = textValName.concat(splitedName[1]);
6238   -
  6208 +
6239 6209 $rootScope.canvasLayerNameCollection = [];
6240 6210 $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
6241   -
6242   -
  6211 +
  6212 +
6243 6213  
6244 6214 $('#canvas').setLayer(layer.name, {
6245 6215 handle: {
... ... @@ -6254,7 +6224,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6254 6224  
6255 6225 },
6256 6226 mouseout: function (layer) {
6257   -
  6227 +
6258 6228 $rootScope.canvasLayerNameCollection = [];
6259 6229 $('#canvas').setLayer(layer.name, {
6260 6230 handle: {
... ... @@ -6270,7 +6240,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6270 6240  
6271 6241 },
6272 6242 mouseover: function (layer) {
6273   -
  6243 +
6274 6244 $('#canvas').setLayer(layer.name, {
6275 6245 handle: {
6276 6246 type: 'rectangle',
... ... @@ -6285,16 +6255,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6285 6255 }
6286 6256 });
6287 6257 $("#text_area").val('');
6288   -
6289   - $("#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" });
6290   -
  6258 +
  6259 + $("#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"});
  6260 +
6291 6261 }
6292 6262  
6293 6263  
6294 6264  
6295 6265 function OnPaintCanvasMouseMove(event) {
6296 6266  
6297   -
  6267 +
6298 6268 }
6299 6269  
6300 6270 $rootScope.FreeStylePaint = function (e) {
... ... @@ -6668,7 +6638,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6668 6638  
6669 6639 if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
6670 6640 $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
6671   - }
  6641 + }
6672 6642  
6673 6643 }
6674 6644  
... ... @@ -6682,7 +6652,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6682 6652  
6683 6653 var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
6684 6654  
6685   - $('#bodySystems').empty();
  6655 + //var systemListHtml = '<option value="0" selected="">All</option>'
6686 6656  
6687 6657 var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems');
6688 6658 $compile($all)($scope);
... ... @@ -6691,9 +6661,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6691 6661  
6692 6662 var $elem = $('<option ng-click=refreshTermListOnSystemSelection($event) id="' + value._BodySystemId + '" title="' + value._Name + '" >' + value._Name + '</option>').appendTo('#bodySystems');
6693 6663 $compile($elem)($scope);
  6664 + // systemListHtml = systemListHtml + '<<option id="' + value._BodySystemId + '" title="' + value._Name + '" ng-click=" $scope.refreshTermListOnSystemSelection(event)">' + value._Name + '</option>'
6694 6665 })
6695 6666  
6696 6667  
  6668 + // $('#bodySystems').append(systemListHtml);
6697 6669  
6698 6670  
6699 6671 var currentView = localStorage.getItem("currentViewTitle");
... ... @@ -6708,8 +6680,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6708 6680 $rootScope.viewOrientationId = currentOpenViewId;
6709 6681 //confirm that this is DA module which is last open
6710 6682 if (currentOpenModuleId == 1) {
6711   -
6712   - $('#termList').empty();
  6683 + //$http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
  6684 + // $rootScope.TermNumberData = data;
  6685 + // var actualtermList = new jinqJs()
  6686 + // .from($rootScope.TermNumberData.TermData.Term)
  6687 + // .select('_ActualTermNumber');
  6688 +
  6689 + // var TermTextList = [];
  6690 + // var TermTextList = [];
  6691 +
6713 6692 $scope.loadListManger();
6714 6693  
6715 6694  
... ... @@ -6771,7 +6750,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6771 6750 })
6772 6751  
6773 6752  
6774   -
6775 6753 $scope.VocabTermTxt = new jinqJs()
6776 6754 .from(vocabTermTxt)
6777 6755 .distinct('_TermText', '_ActualTermNumber')
... ... @@ -6795,7 +6773,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6795 6773 }
6796 6774 // })
6797 6775  
6798   -
  6776 +
6799 6777 //.error(function (data, status, headers, config) {
6800 6778  
6801 6779 // console.log(data);
... ... @@ -6899,22 +6877,60 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6899 6877  
6900 6878 //8.remove current layer canavses
6901 6879 $scope.flushCanvas();
6902   -
  6880 + //for (var i = 1; i < 7; i++) {
  6881 +
  6882 + // var id;
  6883 + // var maskId;
  6884 +
  6885 + // id = 'imageCanvas' + i;
  6886 + // maskId = 'imageCanvas' + i + '_mci';
  6887 +
  6888 + // var canvas = document.getElementById(id);
  6889 + // document.getElementById('canvasDiv').removeChild(canvas);
  6890 +
  6891 + // var maskcanvas = document.getElementById(maskId);
  6892 + // document.getElementById('canvasDiv').removeChild(maskcanvas);
  6893 +
  6894 + // if (i == 4 || i == 5 || i == 6) {
  6895 + // id = 'imageCanvas' + i + '_MR';
  6896 + // maskId = 'imageCanvas' + i + '_MR_mci';
  6897 +
  6898 + // var canvas = document.getElementById(id);
  6899 + // document.getElementById('canvasDiv').removeChild(canvas);
  6900 +
  6901 + // var maskcanvas = document.getElementById(maskId);
  6902 + // document.getElementById('canvasDiv').removeChild(maskcanvas);
  6903 + // }
  6904 +
  6905 + // //remove modesty canavs
  6906 + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  6907 + // for (var j = 0; j < modestyCanvases.length; j++) {
  6908 + // modestyCanvases[j].remove();
  6909 + // }
  6910 + //}
6903 6911  
6904 6912 //9.
6905 6913 $timeout(function () {
6906 6914 $rootScope.isHighLight = false;
6907   -
6908   - //removing speechbubble
6909   - $('#sppeachBubble').css('display', 'none');
6910   - $("#dot").css("display", "none");
6911   -
6912   - //redraw body of respective layer
6913 6915 $scope.CalculateImageCordinates($rootScope.viewOrientationId)
6914 6916 }, 500);
6915 6917  
  6918 + $scope.isHighlightByListManager = true;
  6919 +
  6920 + //10.
  6921 + //$timeout(function () {
  6922 + // $rootScope.isHighLight = true;
  6923 + // $scope.highLightBody()
  6924 + //}, 500);
  6925 + //$timeout(function () {
  6926 +
  6927 + // // $rootScope.isHighLight = false;
  6928 +
  6929 + // $scope.HighlightBodyByTermList($scope.TermList)
  6930 + //}, 2000);
  6931 +
  6932 + //4.get scroll position
6916 6933  
6917   -
6918 6934 }
6919 6935  
6920 6936 $scope.getChildTermList = function (termNo) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -238,7 +238,7 @@
238 238  
239 239 <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; ">
240 240 <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; ">
241   - <img id="navimg" ng-src="{{navimgsrc}}" alt=""></img>
  241 + <img id="navimg" ng-src="{{navimgsrc}}" alt="">
242 242 <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition">
243 243 </div>
244 244 </div>
... ...