Commit cc7a9a9dc2e513c887d772db7abeb73bb2604c30

Authored by unknown
1 parent 4878814b

EditShape Modal Chnages and merged branch blackIssueInTb

400-SOURCECODE/AIAHTML5.Web/Web.config
... ... @@ -18,7 +18,7 @@
18 18 <httpRuntime targetFramework="4.5" />
19 19 </system.web>
20 20 <system.webServer>
21   - <rewrite>
  21 + <!--<rewrite>
22 22 <rules>
23 23 <rule name="AngularJS Routes" stopProcessing="true">
24 24 <match url=".*" />
... ... @@ -30,7 +30,7 @@
30 30 <action type="Rewrite" url="/AIA/" />
31 31 </rule>
32 32 </rules>
33   - </rewrite>
  33 + </rewrite>-->
34 34 <staticContent>
35 35 <remove fileExtension=".mp3" />
36 36 <clientCache cacheControlMode="DisableCache" />
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1   -'use strict';
  1 +
  2 +'use strict';
2 3  
3 4 AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService",
4 5 function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) {
... ... @@ -368,7 +369,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
368 369 if ($rootScope.openViews.length > 0) {
369 370 openViews = new jinqJs()
370 371 .from($rootScope.openViews)
371   - .where("BodyViewId==" + currentBodyViewId)
  372 + .where("BodyViewId == " + currentBodyViewId)
372 373 .select();
373 374 }
374 375 }
... ... @@ -380,7 +381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
380 381 if (openViews != null && openViews != undefined) {
381 382 angular.forEach(openViews, function (value, key) {
382 383  
383   - if (value.body - views == tittle) {
  384 + if (value.body-views == tittle) {
384 385 tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
385 386 $rootScope.currentActiveViewTitle = tittle;
386 387 localStorage.setItem("currentViewTitle", tittle);
... ... @@ -717,10 +718,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
717 718 $scope.ColoredImageSRC = [];
718 719 }
719 720  
720   - if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined)
721   - {
722   - angular.forEach($scope.bodyRegionCoordinates, function (value, key)
723   - {
  721 + if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) {
  722 + angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
724 723  
725 724 if (value._HaveMirrorImage == 'Y') {
726 725  
... ... @@ -733,7 +732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
733 732 var src = $scope.GetImageSource(value._BodyRegionId);
734 733  
735 734 $scope.imageSource = src;
736   -
  735 +
737 736 //2.Draw mirror image
738 737 $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
739 738 // debugger;
... ... @@ -756,7 +755,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
756 755 //0. Scaling as per default zoom
757 756 var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0);
758 757  
759   -
  758 +
760 759 //1.Draw body region which have mirror image
761 760 $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
762 761 $scope.BodyRegionCordinatesData.push(
... ... @@ -772,7 +771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
772 771  
773 772 }
774 773 else {
775   -
  774 +
776 775 //0.Scaling as per default zoom
777 776 var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
778 777  
... ... @@ -786,7 +785,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
786 785 $scope.imageSource = src;
787 786 }
788 787  
789   -
790 788 //2.Draw body region which don't have mirror image
791 789 $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
792 790  
... ... @@ -812,6 +810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
812 810 var gender;
813 811 if (localStorage.getItem("genderId") == 'Female') {
814 812 gender = 'F';
  813 +
815 814 }
816 815 else {
817 816 gender = 'M';
... ... @@ -992,6 +991,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
992 991 }
993 992  
994 993  
  994 +
995 995 $scope.GetImageSource = function (bodyRegionId) {
996 996 // debugger;
997 997 var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
... ... @@ -1146,8 +1146,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1146 1146 FlipedImgCanvas.addEventListener('click', function (evt) {
1147 1147  
1148 1148 //to get correct data on multihighlight highlight
1149   - if($scope.isLayerChange == true)
1150   - {
  1149 + if ($scope.isLayerChange == true) {
1151 1150 $scope.isLayerChange = false;
1152 1151 }
1153 1152  
... ... @@ -1428,7 +1427,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1428 1427 $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
1429 1428  
1430 1429 var imgCanvas = document.createElement('canvas');
1431   -
  1430 +
1432 1431 imgCanvas.height = h;
1433 1432 imgCanvas.width = w;
1434 1433 imgCanvas.setAttribute("data-IsMirrored", "N")
... ... @@ -1814,7 +1813,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1814 1813 else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
1815 1814 loopLength = 1;
1816 1815 }
1817   -
  1816 +
1818 1817 if (loopLength !== 0) {
1819 1818 for (var x = 0; x < loopLength; x++) {
1820 1819 if ($rootScope.MaskCanvasData[x] != null || $rootScope.MaskCanvasData[x] != undefined) {
... ... @@ -1918,7 +1917,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1918 1917 grayCanvasContext.putImageData(imgData, 0, 0);
1919 1918 }
1920 1919  
1921   -
  1920 +
1922 1921 if ($rootScope.multiAnnotationIsON == true) {
1923 1922 //debugger;
1924 1923 if (canvasId.match('_MR'))
... ... @@ -1961,6 +1960,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1961 1960  
1962 1961 $scope.HighlightBodyByTermList = function (TermList) {
1963 1962  
  1963 + //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) {
  1964 + // $rootScope.updatedGrayMRDataList = null;
  1965 + // $rootScope.updatedGrayMRDataList = [];
  1966 + //}
  1967 + //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) {
  1968 + // $rootScope.updatedGrayDataList = null;
  1969 + // $rootScope.updatedGrayDataList = [];
  1970 + //}
1964 1971  
1965 1972 console.log('HighlightBodyByTermList is called');
1966 1973  
... ... @@ -2051,7 +2058,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2051 2058 if ($scope.isLayerChange == true) {
2052 2059 if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) {
2053 2060 grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1];
2054   -
  2061 +
2055 2062 }
2056 2063  
2057 2064 } else {
... ... @@ -2135,11 +2142,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2135 2142 if (canvasId.match('_MR')) {
2136 2143 $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData;
2137 2144  
  2145 + //alert('HighlightBodyByTermList, is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON);
  2146 +
  2147 + //$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData;
2138 2148 }
2139 2149 else
2140 2150 $rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData;
2141 2151  
2142   -
  2152 + //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId });
  2153 +
2143 2154 console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length)
2144 2155  
2145 2156 if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) {
... ... @@ -2184,8 +2195,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2184 2195  
2185 2196  
2186 2197  
2187   -
2188   -
2189 2198 $scope.createTermListByPreviousTermsAndHighlight = function () {
2190 2199  
2191 2200  
... ... @@ -2209,14 +2218,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2209 2218  
2210 2219 console.log('createTermListByPreviousTermsAndHighlight is called');
2211 2220  
2212   - if ((multiTermList != undefined || multiTermList!=null) && multiTermList.length>0) {
  2221 + if ((multiTermList != undefined || multiTermList != null) && multiTermList.length > 0) {
2213 2222  
2214 2223 $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50);
2215 2224 }
2216 2225 }
2217 2226  
2218 2227  
2219   -
2220 2228 $scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) {
2221 2229 var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1);
2222 2230  
... ... @@ -2320,6 +2328,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2320 2328 //layer change function
2321 2329 $scope.LayerChange = function () {
2322 2330  
  2331 + //remove annotation
  2332 +
  2333 +
  2334 +
  2335 +
2323 2336 $scope.isLayerChange = true;
2324 2337 $rootScope.isLoading = true;
2325 2338 $('#spinner').css('visibility', 'visible');
... ... @@ -2575,7 +2588,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2575 2588 else {
2576 2589 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length)
2577 2590 }
2578   -
  2591 + if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){
2579 2592 if ($scope.longestAnnotation.length <= 10) {
2580 2593  
2581 2594  
... ... @@ -2634,6 +2647,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2634 2647  
2635 2648  
2636 2649 }
  2650 +
  2651 + }
2637 2652 var Globe = [];
2638 2653 Globe.push({ currentX: x, currentY: y });
2639 2654  
... ... @@ -3767,41 +3782,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3767 3782 }
3768 3783  
3769 3784  
3770   - // niki 3june
3771   - //var txtTransparencyChange = document.getElementById("txtTransparencyChange");
3772   - ////for first time, the transparency should be 50%
3773   - //if ($scope.isTboxDrwan) {
3774   -
3775   - // if (txtTransparencyChange != null)
3776   - // txtTransparencyChange.value = 50;
3777   -
3778   - // $scope.isTboxDrwan = false;
3779   -
3780   - //}
3781   -
3782   - //check if transparency is activated
  3785 + //check if transparency is activated
3783 3786  
3784 3787  
3785 3788 var transNumber = $scope.transNumber;//txtTransparencyChange.value;
3786 3789 // debugger;
3787   - //this changes the transparency when transparency is already activated(on scale the value is >0) and user resizes or chage the layer
  3790 + //this changes the transparency when transparency is already activated and user resizes or chage the layer
3788 3791  
3789 3792 var imageD = tempCtx.getImageData(0, 0, Width, Height);
3790 3793  
3791   - if (transNumber > 0) {
3792   - // debugger;
3793   -
3794   -
3795   - // tempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;
  3794 +
3796 3795 var tempCtx = document.getElementById(tempCanvasID).getContext('2d');
3797 3796  
3798   - // var image = ctx.getImageData(0, 0, scope.transparencyCanvasWidth, scope.transparencyCanvasHeight);
3799   -
3800   -
3801 3797 //keep the original image on temp canavs to use it in changing transparency
3802   - // if (scope.isResized == true || scope.isLayerChanged) {
3803   - //debugger;
3804   -
  3798 +
3805 3799 if (document.getElementById('tempCanvas') != null) {
3806 3800 var contx = document.getElementById('tempCanvas').getContext('2d');
3807 3801 var tbTempCanvas = document.getElementById(tempCanvasID)
... ... @@ -3836,8 +3830,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3836 3830  
3837 3831 tempCtx.putImageData(imageD, 0, 0);
3838 3832  
3839   - }
3840   -
  3833 +
3841 3834 var ctx = transparencyCanvas.getContext('2d');
3842 3835  
3843 3836  
... ... @@ -4494,6 +4487,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4494 4487  
4495 4488 $scope.enableZoom = function () {
4496 4489  
  4490 + //remove speech bubble
  4491 + $('#sppeachBubble').css('display', 'none');
  4492 +
  4493 + $("#dot").css("display", "none");
  4494 +
4497 4495 $scope.terminateCurrentlyRunningWPs();
4498 4496  
4499 4497 if ($scope.isTransparencyActivated) {
... ... @@ -4542,54 +4540,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4542 4540  
4543 4541 $scope.flushCanvas = function () {
4544 4542  
4545   - if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
4546   - angular.forEach($scope.ColoredImageSRC, function (value, key) {
4547   -
4548   - var id;
4549   - var maskId;
4550   - if (value.haveMirror == 'true') {
4551   - id = 'imageCanvas' + value.bodyRegionId + '_MR';
4552   - maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
4553   - }
4554   - else {
4555   - id = 'imageCanvas' + value.bodyRegionId;
4556   - maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
4557   - }
4558   -
4559   - var canvas = document.getElementById(id);
4560   - if (canvas != null || canvas != undefined) {
4561   - document.getElementById('canvasDiv').removeChild(canvas);
4562   - }
4563   -
4564   - var maskcanvas = document.getElementById(maskId);
4565   - if (maskcanvas != null || maskcanvas != undefined) {
4566   - document.getElementById('canvasDiv').removeChild(maskcanvas);
4567   -
4568   - }
4569   -
4570   - var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4571   - for (var i = 0; i < modestyCanvases.length; i++) {
4572   - modestyCanvases[i].remove();
4573   - }
4574   - });
4575   - }
  4543 + //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
  4544 + // angular.forEach($scope.ColoredImageSRC, function (value, key) {
4576 4545  
4577   - //for (var i = 1; i < 7; i++) {
4578   -
4579   - // var id;
4580   - // var maskId;
4581   -
4582   - // id = 'imageCanvas' + i;
4583   - // maskId = 'imageCanvas' + i + '_mci';
  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 + // }
4584 4556  
4585   - // var canvas = document.getElementById(id);
4586   - // if (canvas != null || canvas != undefined)
4587   - // document.getElementById('canvasDiv').removeChild(canvas);
  4557 + // var canvas = document.getElementById(id);
  4558 + // if (canvas != null || canvas != undefined) {
  4559 + // document.getElementById('canvasDiv').removeChild(canvas);
  4560 + // }
4588 4561  
4589   - // var maskcanvas = document.getElementById(maskId);
4590   - // if (maskcanvas != null || maskcanvas != undefined)
4591   - // document.getElementById('canvasDiv').removeChild(maskcanvas);
  4562 + // var maskcanvas = document.getElementById(maskId);
  4563 + // if (maskcanvas != null || maskcanvas != undefined) {
  4564 + // document.getElementById('canvasDiv').removeChild(maskcanvas);
4592 4565  
  4566 + // }
4593 4567 // if (i == 4 || i == 5 || i == 6) {
4594 4568 // id = 'imageCanvas' + i + '_MR';
4595 4569 // maskId = 'imageCanvas' + i + '_MR_mci';
... ... @@ -4603,6 +4577,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4603 4577 // document.getElementById('canvasDiv').removeChild(maskcanvas);
4604 4578 // }
4605 4579  
  4580 + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  4581 + // for (var i = 0; i < modestyCanvases.length; i++) {
  4582 + // modestyCanvases[i].remove();
  4583 + // }
  4584 + // });
4606 4585 // //remove modesty canavs
4607 4586 // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4608 4587 // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
... ... @@ -4611,6 +4590,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4611 4590 // }
4612 4591 // }
4613 4592 //}
  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 + }
4614 4631 }
4615 4632  
4616 4633 $scope.terminateCurrentlyRunningWPs = function () {
... ... @@ -4750,7 +4767,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4750 4767  
4751 4768 $scope.highLightBody = function () {
4752 4769  
4753   - // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId);
  4770 + console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length);
4754 4771  
4755 4772 $scope.terminateCurrentlyRunningWPs();
4756 4773  
... ... @@ -4773,13 +4790,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4773 4790 $scope.doHighlightOrExtract = false;
4774 4791 }
4775 4792  
4776   - console.log('$scope.doHighlightOrExtract= ' + $scope.doHighlightOrExtract)
  4793 +
4777 4794 if ($scope.doHighlightOrExtract == true) {
4778 4795 if ($rootScope.isHighLight == true) {
4779 4796  
4780 4797 $scope.grayedBR = [];
4781 4798  
4782 4799 angular.forEach($scope.ColoredImageSRC, function (value, key) {
  4800 + console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length)
4783 4801 var id;
4784 4802 if (value.haveMirror == 'true') {
4785 4803 id = 'imageCanvas' + value.bodyRegionId + '_MR';
... ... @@ -4819,7 +4837,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4819 4837 img.src = dataURL;
4820 4838  
4821 4839 img.onload = function () {
4822   -
  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 var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
4825 4844 DAData.draw(img);
... ... @@ -4837,26 +4856,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4837 4856  
4838 4857 DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
4839 4858  
4840   -
  4859 +
4841 4860 context_gray.putImageData(DAData.data, 0, 0)
4842   -
4843   - // to resolve lateral arm black issue in highlight mode
4844 4861  
4845   - if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) {
4846   -
  4862 + //NIKI- to resolve lateral arm black issue in highlight mode
  4863 +
  4864 + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) {
  4865 +
4847 4866 var imgData = context_gray.getImageData(0, 0, width, ht);
4848 4867 var data = imgData.data;
4849   - var c=0;
  4868 + var c = 0;
4850 4869 for (var i = 0; i < data.length; i += 4) {
4851 4870 if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) {
4852 4871 data[i + 3] = 0;
4853 4872 }
4854   -
  4873 +
4855 4874 }
4856 4875 context_gray.putImageData(imgData, 0, 0);
4857 4876 }
4858   -
4859   - //
  4877 +
4860 4878 //push BRID into array
4861 4879 $scope.grayedBR.push({ 'BRID': value.bodyRegionId });
4862 4880  
... ... @@ -4908,18 +4926,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4908 4926  
4909 4927 if ($scope.isEligibleForHighlightBodyByTermList == true) {
4910 4928 //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
4911   - if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
  4929 + // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
4912 4930 $scope.isLoading = false;
4913 4931  
4914 4932 $('#spinner').css('visibility', 'hidden');
4915   - }
  4933 + //}
4916 4934  
4917 4935 if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
4918 4936  
  4937 + $scope.isLoading = true;
  4938 +
  4939 + $('#spinner').css('visibility', 'visible');
4919 4940 $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
4920 4941 }
4921   - else if ($scope.isHighlightByListManager == true) {
  4942 + else if ($rootScope.isListManagerSelected == true) {
4922 4943  
  4944 + // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
4923 4945 $timeout(function () {
4924 4946  
4925 4947 $scope.HighlightBodyByTermList($scope.AllTerms)
... ... @@ -4929,7 +4951,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4929 4951 else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4930 4952 $scope.createTermListByPreviousTermsAndHighlight();
4931 4953 }
4932   -
4933 4954  
4934 4955 }
4935 4956  
... ... @@ -4942,12 +4963,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4942 4963  
4943 4964 if ($rootScope.isExtract == true) {
4944 4965 if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4945   - console.log('HighlightBodyOnExtract')
  4966 +
4946 4967 $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
4947 4968 }
4948 4969 }
4949 4970 //else {
4950   - // console.log('INSIDE ELSE. $scope.grayedBR.length= ' + $scope.grayedBR.length)
4951 4971 // // this code is for the case where user first clcik on normal mode then extract then again highlight then we need to call highlight body in gray mode
4952 4972 // //and then highlight the previously selected body regions at the time of normal mode.
4953 4973 // if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
... ... @@ -4966,14 +4986,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4966 4986  
4967 4987  
4968 4988 // }
4969   - // console.log('INSIDE ELSE $scope.isEligibleForHighlightBodyByTermList = ' + $scope.isEligibleForHighlightBodyByTermList)
  4989 +
4970 4990 // //
4971 4991 //}
4972 4992 })
4973   -
4974   - //if ($scope.isEligibleForHighlightBodyByTermList == true) {
4975   - // console.log('CREATE multiTermList')
4976 4993  
  4994 + //if ($scope.isEligibleForHighlightBodyByTermList == true) {
4977 4995 // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4978 4996  
4979 4997 // var multiTermList = [];
... ... @@ -5016,6 +5034,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5016 5034  
5017 5035 var imageCanvas = document.getElementById(id);
5018 5036  
  5037 + //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
  5038 + //var coloredCanvas = document.getElementById(coloredCanvasID);
5019 5039  
5020 5040 var width = value.Width;
5021 5041 var ht = value.Height;
... ... @@ -5326,6 +5346,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5326 5346 $rootScope.isLoading = true;
5327 5347 $('#spinner').css('visibility', 'visible');
5328 5348  
  5349 +
  5350 + if ($rootScope.openViews.length > 0) {
  5351 + $rootScope.openViews.splice($rootScope.openViews.length - 1);
  5352 + }
  5353 +
5329 5354 $rootScope.isViewChange = true;
5330 5355 $scope.layerNumber = 0;
5331 5356 // debugger;
... ... @@ -5465,7 +5490,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5465 5490 //Reload DA controller Body View after setting Change
5466 5491 $scope.$on('reloadDABodyViewEvent', function (event, data) {
5467 5492 //console.log('reloadDABodyViewEvent');
5468   -
  5493 + $scope.layerNumber = parseInt($('#txtlayerNumber').val());
5469 5494 $scope.ReloadBodyViewId = data.reloadDABodyViewId;
5470 5495 // $scope.layerNumber = 0;
5471 5496 // debugger;
... ... @@ -5491,38 +5516,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5491 5516  
5492 5517 $scope.skinTone = $rootScope.globalSetting.ethnicity;
5493 5518  
5494   - var navdtlOrient = new jinqJs()
5495   - .from($scope.NavigatorData.Navigtor.ViewOrientation)
5496   - .where("_ViewOrientationId == " + $scope.voId)
5497   - .select();
5498   - if (navdtlOrient != null || navdtlOrient != undefined) {
  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();
5499 5524  
5500   - var navOrientationdata = new jinqJs()
5501   - .from(navdtlOrient[0].ImageInfo)
5502   - .where("_Ethnicity == " + $scope.skinTone)
5503   - .select();
5504 5525  
5505   - if (navOrientationdata != null || navOrientationdata != undefined) {
  5526 + if (navdtlOrient != null || navdtlOrient != undefined) {
5506 5527  
5507   - $scope.navigatorImage = navOrientationdata;
  5528 + var navOrientationdata = new jinqJs()
  5529 + .from(navdtlOrient[0].ImageInfo)
  5530 + .where("_Ethnicity == " + $scope.skinTone)
  5531 + .select();
5508 5532  
  5533 + if (navOrientationdata != null || navOrientationdata != undefined) {
5509 5534  
5510   - var navImageModesty;
  5535 + $scope.navigatorImage = navOrientationdata;
5511 5536  
5512   - angular.forEach($scope.navigatorImage, function (value, key) {
5513   - if (value._HaveModesty === $rootScope.globalSetting.modesty) {
5514   - navImageModesty = value._ImageName;
5515   - }
5516   - })
5517   - if (typeof (navImageModesty) === "undefined" || navImageModesty === null) {
5518 5537  
5519   - navImageModesty = $scope.navigatorImage[0]._ImageName;
  5538 + var navImageModesty;
5520 5539  
5521   - }
  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) {
5522 5546  
5523   - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
  5547 + navImageModesty = $scope.navigatorImage[0]._ImageName;
  5548 +
  5549 + }
  5550 +
  5551 + $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
  5552 + }
5524 5553 }
  5554 +
5525 5555 }
  5556 +
5526 5557 }
5527 5558  
5528 5559 //Annotation tool event lsitener
... ... @@ -6129,7 +6160,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6129 6160  
6130 6161 }
6131 6162  
6132   - //-- TextArea functionality of Annotation toolbar
  6163 + //-- TextArea functionality of Annotation toolbar
6133 6164  
6134 6165 $rootScope.fontSizes;
6135 6166 $rootScope.fontWeight;
... ... @@ -6140,8 +6171,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6140 6171 $rootScope.textArea;
6141 6172 $rootScope.fontFamily;
6142 6173 $rootScope.saveText = function () {
6143   -
6144   - $rootScope.fontSizes = $("#text_area").css("font-size");
  6174 +
  6175 + $rootScope.fontSizes = $("#text_area").css("font-size");
6145 6176 $rootScope.fontWeight = $("#text_area").css("font-weight");
6146 6177 $rootScope.fontStyle = $("#text_area").css("font-style");
6147 6178 $rootScope.textAlignmt = $("#text_area").css("text-align");
... ... @@ -6155,7 +6186,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6155 6186 $('#canvas').drawText({
6156 6187 layer: true,
6157 6188 draggable: true,
6158   - name:'TextArea_'+ $rootScope.resetText,
  6189 + name: 'TextArea_' + $rootScope.resetText,
6159 6190 groups: ['TextArea_' + $rootScope.resetText],
6160 6191 dragGroups: ['TextArea_' + $rootScope.resetText],
6161 6192 fillStyle: $rootScope.fontColor,
... ... @@ -6168,16 +6199,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6168 6199 x: $scope.offsetX1, y: $scope.offsetY1,
6169 6200 maxWidth: $scope.x - $scope.offsetX1,
6170 6201 maxHeight: $scope.y - $scope.offsetY1,
6171   -
  6202 +
6172 6203 click: function (layer) {
6173   -
6174 6204  
6175   -
  6205 +
  6206 +
6176 6207 },
6177 6208 change: function (layer, props) {
6178 6209  
6179 6210 }
6180   -
  6211 +
6181 6212 })
6182 6213 // Draw rect as wide as the text
6183 6214 .drawRect({
... ... @@ -6198,19 +6229,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6198 6229  
6199 6230 click: function (layer) {
6200 6231 $rootScope.shapeTypeText = "textAreaRect";
6201   -
  6232 +
6202 6233 var layerNameSplit = layer.name;
6203   -
  6234 +
6204 6235 var splitedName = layerNameSplit.split("_");
6205   -
  6236 +
6206 6237 var textValName = "TextArea_";
6207   -
  6238 +
6208 6239 var concatinateResult = textValName.concat(splitedName[1]);
6209   -
  6240 +
6210 6241 $rootScope.canvasLayerNameCollection = [];
6211 6242 $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
6212   -
6213   -
  6243 +
  6244 +
6214 6245  
6215 6246 $('#canvas').setLayer(layer.name, {
6216 6247 handle: {
... ... @@ -6225,7 +6256,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6225 6256  
6226 6257 },
6227 6258 mouseout: function (layer) {
6228   -
  6259 +
6229 6260 $rootScope.canvasLayerNameCollection = [];
6230 6261 $('#canvas').setLayer(layer.name, {
6231 6262 handle: {
... ... @@ -6241,7 +6272,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6241 6272  
6242 6273 },
6243 6274 mouseover: function (layer) {
6244   -
  6275 +
6245 6276 $('#canvas').setLayer(layer.name, {
6246 6277 handle: {
6247 6278 type: 'rectangle',
... ... @@ -6256,16 +6287,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6256 6287 }
6257 6288 });
6258 6289 $("#text_area").val('');
6259   -
6260   - $("#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"});
6261   -
  6290 +
  6291 + $("#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" });
  6292 +
6262 6293 }
6263 6294  
6264 6295  
6265 6296  
6266 6297 function OnPaintCanvasMouseMove(event) {
6267 6298  
6268   -
  6299 +
6269 6300 }
6270 6301  
6271 6302 $rootScope.FreeStylePaint = function (e) {
... ... @@ -6677,7 +6708,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6677 6708  
6678 6709 if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
6679 6710 $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
6680   - }
  6711 + }
6681 6712  
6682 6713 }
6683 6714  
... ... @@ -6691,7 +6722,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6691 6722  
6692 6723 var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
6693 6724  
6694   - //var systemListHtml = '<option value="0" selected="">All</option>'
  6725 + $('#bodySystems').empty();
6695 6726  
6696 6727 var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems');
6697 6728 $compile($all)($scope);
... ... @@ -6700,11 +6731,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6700 6731  
6701 6732 var $elem = $('<option ng-click=refreshTermListOnSystemSelection($event) id="' + value._BodySystemId + '" title="' + value._Name + '" >' + value._Name + '</option>').appendTo('#bodySystems');
6702 6733 $compile($elem)($scope);
6703   - // systemListHtml = systemListHtml + '<<option id="' + value._BodySystemId + '" title="' + value._Name + '" ng-click=" $scope.refreshTermListOnSystemSelection(event)">' + value._Name + '</option>'
6704 6734 })
6705 6735  
6706 6736  
6707   - // $('#bodySystems').append(systemListHtml);
6708 6737  
6709 6738  
6710 6739 var currentView = localStorage.getItem("currentViewTitle");
... ... @@ -6719,15 +6748,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6719 6748 $rootScope.viewOrientationId = currentOpenViewId;
6720 6749 //confirm that this is DA module which is last open
6721 6750 if (currentOpenModuleId == 1) {
6722   - //$http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
6723   - // $rootScope.TermNumberData = data;
6724   - // var actualtermList = new jinqJs()
6725   - // .from($rootScope.TermNumberData.TermData.Term)
6726   - // .select('_ActualTermNumber');
6727   -
6728   - // var TermTextList = [];
6729   - // var TermTextList = [];
6730   -
  6751 +
  6752 + $('#termList').empty();
6731 6753 $scope.loadListManger();
6732 6754  
6733 6755  
... ... @@ -6789,6 +6811,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6789 6811 })
6790 6812  
6791 6813  
  6814 +
6792 6815 $scope.VocabTermTxt = new jinqJs()
6793 6816 .from(vocabTermTxt)
6794 6817 .distinct('_TermText', '_ActualTermNumber')
... ... @@ -6812,7 +6835,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6812 6835 }
6813 6836 // })
6814 6837  
6815   -
  6838 +
6816 6839 //.error(function (data, status, headers, config) {
6817 6840  
6818 6841 // console.log(data);
... ... @@ -6916,60 +6939,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6916 6939  
6917 6940 //8.remove current layer canavses
6918 6941 $scope.flushCanvas();
6919   - //for (var i = 1; i < 7; i++) {
6920   -
6921   - // var id;
6922   - // var maskId;
6923   -
6924   - // id = 'imageCanvas' + i;
6925   - // maskId = 'imageCanvas' + i + '_mci';
6926   -
6927   - // var canvas = document.getElementById(id);
6928   - // document.getElementById('canvasDiv').removeChild(canvas);
6929   -
6930   - // var maskcanvas = document.getElementById(maskId);
6931   - // document.getElementById('canvasDiv').removeChild(maskcanvas);
6932   -
6933   - // if (i == 4 || i == 5 || i == 6) {
6934   - // id = 'imageCanvas' + i + '_MR';
6935   - // maskId = 'imageCanvas' + i + '_MR_mci';
6936   -
6937   - // var canvas = document.getElementById(id);
6938   - // document.getElementById('canvasDiv').removeChild(canvas);
6939   -
6940   - // var maskcanvas = document.getElementById(maskId);
6941   - // document.getElementById('canvasDiv').removeChild(maskcanvas);
6942   - // }
6943   -
6944   - // //remove modesty canavs
6945   - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
6946   - // for (var j = 0; j < modestyCanvases.length; j++) {
6947   - // modestyCanvases[j].remove();
6948   - // }
6949   - //}
  6942 +
6950 6943  
6951 6944 //9.
6952 6945 $timeout(function () {
6953 6946 $rootScope.isHighLight = false;
6954   - $scope.CalculateImageCordinates($rootScope.viewOrientationId)
6955   - }, 500);
6956   -
6957   - $scope.isHighlightByListManager = true;
6958 6947  
6959   - //10.
6960   - //$timeout(function () {
6961   - // $rootScope.isHighLight = true;
6962   - // $scope.highLightBody()
6963   - //}, 500);
6964   - //$timeout(function () {
  6948 + //removing speechbubble
  6949 + $('#sppeachBubble').css('display', 'none');
  6950 + $("#dot").css("display", "none");
6965 6951  
6966   - // // $rootScope.isHighLight = false;
  6952 + //redraw body of respective layer
  6953 + $scope.CalculateImageCordinates($rootScope.viewOrientationId)
  6954 + }, 500);
6967 6955  
6968   - // $scope.HighlightBodyByTermList($scope.TermList)
6969   - //}, 2000);
6970   -
6971   - //4.get scroll position
6972 6956  
  6957 +
6973 6958 }
6974 6959  
6975 6960 $scope.getChildTermList = function (termNo) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -72,7 +72,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
72 72 if (alreadyOpenThisView != null) {
73 73 for (var i = 0; i < $rootScope.openViews.length; i++) {
74 74 k++;
75   - if ($rootScope.openViews[i].body - views == title) {
  75 + if ($rootScope.openViews[i].body-views == title) {
76 76 $rootScope.openViews.splice((k - 1), 1);
77 77  
78 78 $rootScope.openViews.push(
... ... @@ -259,7 +259,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
259 259 $rootScope.shapestyleOpacity = 1;
260 260 $rootScope.shapestyleFillColor = "#fff";
261 261 $rootScope.shapestyleFillBorderColor = "black";
262   - $rootScope.shapestyleborderWidth=2;
  262 + $rootScope.shapestyleborderWidth = 2;
263 263 $rootScope.shapestyleborderStyles = "solid";
264 264 $rootScope.shapestyle = function (id) {
265 265  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -340,7 +340,7 @@
340 340 range: "max", // <--- needed...
341 341 min: 0,
342 342 // max: 100,
343   - //value: 0,
  343 + value: 0,
344 344 slide: function (event, ui) {
345 345 // $("#txtlayerNumber").val(100 - ui.value); // basic math operation..
346 346  
... ...