Commit 91b69582c7961f9f79db64428d39d2dadafeacf5

Authored by Nikita Kulshreshtha
2 parents 751cf26c e717d987

commit after ExtractFixes merge

400-SOURCECODE/AIAHTML5.Web/Web.config
... ... @@ -37,9 +37,8 @@
37 37 <remove fileExtension=".woff" />
38 38 <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
39 39 <mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
40   - <!--<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />-->
41   - <!--<mimeMap fileExtension=".json" mimeType="application/json" />-->
42   -
  40 +
  41 +
43 42 </staticContent>
44 43 <defaultDocument enabled="true">
45 44 <files>
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -221,17 +221,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
221 221 else {
222 222 userEthnicity = $rootScope.globalSetting.ethnicity;
223 223 }
224   -
  224 +
225 225 var curentmodesty = localStorage.getItem("globalmodesty");
226 226 if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
227 227 userModestysettings = curentmodesty
228 228 }
229   - else{
  229 + else {
230 230 userModestysettings = $rootScope.globalSetting.modesty;
231 231 }
232   -
233 232  
234   -
  233 +
  234 +
235 235 //var userSelectedSkintone = 'W';
236 236 //$scope.userModestySetting = 'Y'
237 237 var thumbnailImage;
... ... @@ -352,12 +352,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
352 352 if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
353 353 $rootScope.globalSetting.ethnicity = curentEthnicity;
354 354 }
355   -
  355 +
356 356 var curentmodesty = localStorage.getItem("globalmodesty");
357 357 if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
358 358 $rootScope.globalSetting.modesty = curentmodesty
359 359 }
360   -
  360 +
361 361 //0.1
362 362 var currentBodyViewId = localStorage.getItem("currentBodyViewId");
363 363  
... ... @@ -1167,6 +1167,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1167 1167 $rootScope.multiAnnotationIsON = true;
1168 1168 }
1169 1169 else {
  1170 + if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) {
  1171 + $rootScope.previousHighlightList = [];
  1172 + }
  1173 +
1170 1174 $rootScope.multiAnnotationIsON = false;
1171 1175 }
1172 1176  
... ... @@ -1367,52 +1371,47 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1367 1371 }
1368 1372 );
1369 1373  
1370   - // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
  1374 + // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
1371 1375  
1372 1376  
1373   - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
1374   -
1375   - if((($rootScope.viewOrientationId=='1') || ($rootScope.viewOrientationId=='4')) && ($scope.ColoredImageSRC.length == 9))
1376   - {
  1377 + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
  1378 +
  1379 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
1377 1380 $scope.isEligibleForHighlight = true;
1378 1381 }
1379   - else if((($rootScope.viewOrientationId=='2') || ($rootScope.viewOrientationId=='3')) && ($scope.ColoredImageSRC.length == 5))
1380   - {
  1382 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
1381 1383 $scope.isEligibleForHighlight = true;
1382 1384 }
1383   - else if(($rootScope.viewOrientationId=='5') && ($scope.ColoredImageSRC.length == 4))
1384   - {
  1385 + else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
1385 1386 $scope.isEligibleForHighlight = true;
1386 1387 }
1387   - else if(($rootScope.viewOrientationId=='6') && ($scope.ColoredImageSRC.length == 1))
1388   - {
  1388 + else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
1389 1389 $scope.isEligibleForHighlight = true;
1390 1390 }
1391 1391 else {
1392 1392 $scope.isEligibleForHighlight = false;
1393 1393 }
1394 1394  
1395   - if($scope.isEligibleForHighlight == true)
1396   - {
  1395 + if ($scope.isEligibleForHighlight == true) {
1397 1396 if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
1398 1397  
1399 1398 $rootScope.isLoading = false;
1400 1399 $('#spinner').css('visibility', 'hidden');
1401 1400  
1402   -
1403   - $rootScope.isLoading = true;
1404   - $('#spinner').css('visibility', 'visible');
1405   - $timeout(function () {
1406   - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
1407   - $rootScope.isHighLight = true;
1408 1401  
1409   - $scope.highLightBody()
1410   - }, 500);
1411   - }
1412   - }
  1402 + $rootScope.isLoading = true;
  1403 + $('#spinner').css('visibility', 'visible');
  1404 + $timeout(function () {
  1405 + console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
  1406 + $rootScope.isHighLight = true;
  1407 +
  1408 + $scope.highLightBody()
  1409 + }, 500);
  1410 + }
  1411 + }
1413 1412 }
1414 1413  
1415   - // console.log('ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
  1414 + // console.log('ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
1416 1415 }
1417 1416  
1418 1417 if (FlipedImgCanvas.id.match('_mci')) {
... ... @@ -1438,7 +1437,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1438 1437 }
1439 1438  
1440 1439 $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
1441   -
  1440 +
1442 1441 var imgCanvas = document.createElement('canvas');
1443 1442 // imgCanvas.style.backgroundColor = 'red';
1444 1443 imgCanvas.height = h;
... ... @@ -1495,6 +1494,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1495 1494 $rootScope.multiAnnotationIsON = true;
1496 1495 }
1497 1496 else {
  1497 + if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) {
  1498 + $rootScope.previousHighlightList = [];
  1499 + }
1498 1500 $rootScope.multiAnnotationIsON = false;
1499 1501 }
1500 1502  
... ... @@ -1686,8 +1688,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1686 1688 if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
1687 1689 //do nothing
1688 1690 }
1689   - else
1690   - {
  1691 + else {
1691 1692 $scope.ColoredImageSRC.push(
1692 1693 {
1693 1694 "bodyRegionId": bodyRegionId, "SRC": src,
... ... @@ -1700,28 +1701,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1700 1701  
1701 1702 );
1702 1703  
1703   - console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
  1704 + //console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
1704 1705  
1705   - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
  1706 + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
1706 1707  
1707   - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
1708   - $scope.isEligibleForHighlight = true;
1709   - }
1710   - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
1711   - $scope.isEligibleForHighlight = true;
1712   - }
1713   - else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
1714   - $scope.isEligibleForHighlight = true;
1715   - }
1716   - else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
1717   - $scope.isEligibleForHighlight = true;
1718   - }
1719   - else {
1720   - $scope.isEligibleForHighlight = false;
1721   - }
  1708 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
  1709 + $scope.isEligibleForHighlight = true;
  1710 + }
  1711 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
  1712 + $scope.isEligibleForHighlight = true;
  1713 + }
  1714 + else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
  1715 + $scope.isEligibleForHighlight = true;
  1716 + }
  1717 + else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
  1718 + $scope.isEligibleForHighlight = true;
  1719 + }
  1720 + else {
  1721 + $scope.isEligibleForHighlight = false;
  1722 + }
1722 1723  
1723   - if ($scope.isEligibleForHighlight == true) {
1724   - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
  1724 + if ($scope.isEligibleForHighlight == true) {
  1725 + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
1725 1726  
1726 1727 $rootScope.isLoading = false;
1727 1728 $('#spinner').css('visibility', 'hidden');
... ... @@ -1743,37 +1744,37 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1743 1744 }
1744 1745 }
1745 1746  
1746   - // if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) && ($scope.ColoredImageSRC.length == 9)) {
1747   - // console.log('after check= ' + $scope.ColoredImageSRC.length)
1748   - // $rootScope.isLoading = false;
1749   - // $('#spinner').css('visibility', 'hidden');
1750   -
1751   - // if ($rootScope.isListManagerSelected == true || $rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
1752   - // $rootScope.isLoading = true;
1753   - // $('#spinner').css('visibility', 'visible');
1754   - // $timeout(function () {
1755   - // console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
1756   - // $rootScope.isHighLight = true;
1757   -
1758   - // $scope.highLightBody()
1759   - // }, 500);
1760   - // }
1761   - // }
1762   - // }
  1747 + // if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) && ($scope.ColoredImageSRC.length == 9)) {
  1748 + // console.log('after check= ' + $scope.ColoredImageSRC.length)
  1749 + // $rootScope.isLoading = false;
  1750 + // $('#spinner').css('visibility', 'hidden');
  1751 +
  1752 + // if ($rootScope.isListManagerSelected == true || $rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
  1753 + // $rootScope.isLoading = true;
  1754 + // $('#spinner').css('visibility', 'visible');
  1755 + // $timeout(function () {
  1756 + // console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
  1757 + // $rootScope.isHighLight = true;
  1758 +
  1759 + // $scope.highLightBody()
  1760 + // }, 500);
  1761 + // }
  1762 + // }
  1763 + // }
  1764 +
  1765 + //}
  1766 + if (imgCanvas.id.match('_mci')) {
  1767 + var maskImgData = context.getImageData(0, 0, w, h);
  1768 + $rootScope.MaskCanvasData.push(
  1769 + {
  1770 + "bodyRegionId": bodyRegionId,
  1771 + "canvasId": imgCanvas.id,
  1772 + "maskData": maskImgData,
  1773 +
  1774 + }
  1775 + );
  1776 + }
1763 1777  
1764   - //}
1765   - if (imgCanvas.id.match('_mci')) {
1766   - var maskImgData = context.getImageData(0, 0, w, h);
1767   - $rootScope.MaskCanvasData.push(
1768   - {
1769   - "bodyRegionId": bodyRegionId,
1770   - "canvasId": imgCanvas.id,
1771   - "maskData": maskImgData,
1772   -
1773   - }
1774   - );
1775   - }
1776   -
1777 1778 };
1778 1779  
1779 1780 if (document.getElementById('canvasDiv') != null)
... ... @@ -1797,7 +1798,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1797 1798 if (TermList != null) {
1798 1799  
1799 1800 //4.
1800   -
1801 1801 $scope.HighlightBodyByTermList(TermList);
1802 1802 }
1803 1803 }
... ... @@ -1909,27 +1909,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1909 1909 var bodyRegionId = e.data.bodyRegionId;
1910 1910  
1911 1911  
1912   - //if ((CallBackBodyRegion != null || CallBackBodyRegion != undefined))
1913   - //{
1914   - // if (CallBackBodyRegion.length > 0) {
1915   - // for (var i = 1; i <= CallBackBodyRegion.length; i++) {
1916   - // if (CallBackBodyRegion[i].match(bodyRegionId)) {
1917   - // console.log("already have body region id: " + bodyRegionId);
1918   - // }
1919   - // else {
1920   - // CallBackBodyRegion.push(bodyRegionId);
1921   -
1922   - // console.log("pushed body region id: " + bodyRegionId);
1923   - // }
1924   - // }
1925   - // }
1926   - // else
1927   -
1928   - // {
1929   - // CallBackBodyRegion.push(bodyRegionId);
1930   - // }
1931   - //}
1932   -
1933 1912 var canvasId = (e.data.canvasId).replace('_mci', '');
1934 1913 //debugger;
1935 1914 //for (var i = 1; i <= updatedData.length; i++) {
... ... @@ -1988,7 +1967,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1988 1967  
1989 1968 console.log('HighlightBodyByTermList is called');
1990 1969  
1991   - $scope.highlightedBR = null;
  1970 + // $scope.highlightedBR = null;
1992 1971 $scope.highlightedBR = [];
1993 1972  
1994 1973 $scope.terminateCurrentlyRunningWPs();
... ... @@ -2390,17 +2369,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2390 2369 $timeout(function () { $scope.DisableProgressBar() }, 1000);
2391 2370 }
2392 2371  
2393   - //if ($rootScope.isHighLight) {
2394   - // //alert('isHighlight: ' + $scope.isHighLight);
2395   -
2396   - // $('#btnHighLight').removeClass('btn btn-black');
2397   - // $('#btnHighLight').addClass('btn-primary');
2398   -
2399   - // $timeout(function () { $scope.highLightBody() }, 350);
2400   -
2401   -
2402   -
2403   - //}
2404 2372 $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber));
2405 2373 }
2406 2374  
... ... @@ -4339,7 +4307,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4339 4307  
4340 4308 var tBox = document.getElementById('transparencyCanvas');
4341 4309  
4342   -
  4310 +
4343 4311 if (tBox != null) {
4344 4312 tBox.parentNode.removeChild(tBox)
4345 4313 var elements = document.getElementsByClassName('ui-icon ui-icon-gripsmall-diagonal-se');
... ... @@ -4618,9 +4586,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4618 4586  
4619 4587  
4620 4588 }
4621   -
4622   -
4623   - $timeout(function () { $scope.highLightBody() }, 50);
  4589 + else {
  4590 + $timeout(function () { $scope.highLightBody() }, 50);
  4591 + }
4624 4592  
4625 4593 }
4626 4594  
... ... @@ -4719,101 +4687,90 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4719 4687 $scope.terminateCurrentlyRunningWPs();
4720 4688  
4721 4689 //different body views have different count of bodyegions so the length of ColoredImageSRC will be different
4722   - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
4723   -
4724   - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
4725   - $scope.doHighlightOrExtract = true;
4726   - }
4727   - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
4728   - $scope.doHighlightOrExtract = true;
4729   - }
4730   - else if ((($rootScope.viewOrientationId == '5')) && ($scope.ColoredImageSRC.length == 4)) {
4731   - $scope.doHighlightOrExtract = true;
4732   - }
4733   - else if ((($rootScope.viewOrientationId == '6')) && ($scope.ColoredImageSRC.length == 1)) {
4734   - $scope.doHighlightOrExtract = true;
4735   - }
4736   - else {
4737   - $scope.doHighlightOrExtract = false;
4738   - }
4739   -
4740   -
4741   - if ($scope.doHighlightOrExtract == true) {
4742   - if ($rootScope.isHighLight == true) {
4743   -
4744   - $scope.grayeddBR = [];
4745   -
4746   - angular.forEach($scope.ColoredImageSRC, function (value, key) {
4747   - console.log('$scope.ColoredImageSRC length begore gray= ' + $scope.ColoredImageSRC.length)
4748   - var id;
4749   - if (value.haveMirror == 'true') {
4750   - id = 'imageCanvas' + value.bodyRegionId + '_MR';
4751   - }
4752   - else {
4753   - id = 'imageCanvas' + value.bodyRegionId;
4754   - }
4755   -
4756   - //alert(value.bodyRegionId)
4757   -
4758   - var imageCanvas = document.getElementById(id);
  4690 + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
4759 4691  
4760   - //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
4761   - //var coloredCanvas = document.getElementById(coloredCanvasID);
  4692 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
  4693 + $scope.doHighlightOrExtract = true;
  4694 + }
  4695 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
  4696 + $scope.doHighlightOrExtract = true;
  4697 + }
  4698 + else if ((($rootScope.viewOrientationId == '5')) && ($scope.ColoredImageSRC.length == 4)) {
  4699 + $scope.doHighlightOrExtract = true;
  4700 + }
  4701 + else if ((($rootScope.viewOrientationId == '6')) && ($scope.ColoredImageSRC.length == 1)) {
  4702 + $scope.doHighlightOrExtract = true;
  4703 + }
  4704 + else {
  4705 + $scope.doHighlightOrExtract = false;
  4706 + }
4762 4707  
4763   - var width = value.Width;
4764   - var ht = value.Height;
4765 4708  
4766   - var coloredCanvasContext = imageCanvas.getContext("2d");
4767   - var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
4768   - var coloredImageDataVar = coloredImageData;
  4709 + if ($scope.doHighlightOrExtract == true) {
  4710 + if ($rootScope.isHighLight == true) {
4769 4711  
  4712 + $scope.grayedBR = [];
4770 4713  
4771   - if (value.haveMirror == 'true') {
4772   - $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
4773   - }
4774   - else {
  4714 + angular.forEach($scope.ColoredImageSRC, function (value, key) {
  4715 + console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length)
  4716 + var id;
  4717 + if (value.haveMirror == 'true') {
  4718 + id = 'imageCanvas' + value.bodyRegionId + '_MR';
  4719 + }
  4720 + else {
  4721 + id = 'imageCanvas' + value.bodyRegionId;
  4722 + }
4775 4723  
  4724 + var imageCanvas = document.getElementById(id);
4776 4725  
4777   - $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
  4726 + var width = value.Width;
  4727 + var ht = value.Height;
4778 4728  
4779   - }
  4729 + var coloredCanvasContext = imageCanvas.getContext("2d");
  4730 + var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
  4731 + var coloredImageDataVar = coloredImageData;
4780 4732  
4781 4733  
4782   - var context_gray = imageCanvas.getContext('2d');
4783   -
4784   - var dataURL = imageCanvas.toDataURL();
  4734 + if (value.haveMirror == 'true') {
  4735 + $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
  4736 + }
  4737 + else {
4785 4738  
4786 4739  
4787   - var img = new Image();
  4740 + $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
4788 4741  
4789   - img.src = dataURL;
  4742 + }
4790 4743  
  4744 + var context_gray = imageCanvas.getContext('2d');
4791 4745  
  4746 + var dataURL = imageCanvas.toDataURL();
  4747 + var img = new Image();
  4748 + img.src = dataURL;
4792 4749  
4793   - img.onload = function () {
4794   - // console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= '
4795   - // + value.bodyRegionId)
  4750 + img.onload = function () {
  4751 + console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= '
  4752 + + value.bodyRegionId)
4796 4753  
4797   - var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
4798   - DAData.draw(img);
  4754 + var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
  4755 + DAData.draw(img);
4799 4756  
4800   - var colorMode;
  4757 + var colorMode;
4801 4758  
4802   - if ($scope.isExtract == true) {
4803   - colorMode = $scope.applyWhiteMatrix(img, context_gray);
4804   - }
4805   - else {
4806   - colorMode = $scope.applyGrayMatrix(img, context_gray);
4807   - }
  4759 + if ($scope.isExtract == true) {
  4760 + colorMode = $scope.applyWhiteMatrix(img, context_gray);
  4761 + }
  4762 + else {
  4763 + colorMode = $scope.applyGrayMatrix(img, context_gray);
  4764 + }
4808 4765  
4809   - var zeroPoint = new Point();
  4766 + var zeroPoint = new Point();
4810 4767  
4811   - DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
  4768 + DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
4812 4769  
4813 4770  
4814   - context_gray.putImageData(DAData.data, 0, 0)
  4771 + context_gray.putImageData(DAData.data, 0, 0)
4815 4772  
4816   - //NIKI- to resolve lateral arm black issue in highlight mode
  4773 + $scope.grayedBR.push({ 'BRID': value.bodyRegionId });
4817 4774  
4818 4775 if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) {
4819 4776  
... ... @@ -4834,291 +4791,248 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4834 4791  
4835 4792  
4836 4793  
4837   - //push BRID into array
4838   - $scope.grayeddBR.push({ 'BRID': value.bodyRegionId });
4839 4794  
4840   - var grayImageData = context_gray.getImageData(0, 0, width, ht);
4841   - var grayImageImageDataVar = grayImageData.data;
  4795 + var grayImageData = context_gray.getImageData(0, 0, width, ht);
  4796 + var grayImageImageDataVar = grayImageData.data;
4842 4797  
4843   - if ($scope.isExtract == true) {
4844   - if (value.haveMirror == 'true') {
4845   - $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
4846   - }
4847   - else {
4848   -
4849   - $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
4850   - }
  4798 + if ($scope.isExtract == true) {
  4799 + if (value.haveMirror == 'true') {
  4800 + $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
4851 4801 }
4852 4802 else {
4853 4803  
4854   - if (value.haveMirror == 'true') {
4855   - $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
4856   - }
4857   - else {
4858   -
4859   - $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
4860   - }
  4804 + $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
4861 4805 }
  4806 + }
  4807 + else {
4862 4808  
  4809 + if (value.haveMirror == 'true') {
  4810 + $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
  4811 + }
  4812 + else {
4863 4813  
  4814 + $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
  4815 + }
  4816 + }
4864 4817  
4865   - if ($scope.grayeddBR != null || $scope.grayeddBR != undefined) {
4866   - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayeddBR.length == 9)) {
4867   - $scope.isEligibleForHighlightBodyByTermList = true;
4868   - $scope.doHighlightOrExtract = false;
4869   - }
4870   - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayeddBR.length == 5)) {
4871   - $scope.isEligibleForHighlightBodyByTermList = true;
4872   - $scope.doHighlightOrExtract = false;
4873   - }
4874   - else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayeddBR.length == 4)) {
4875   - $scope.isEligibleForHighlightBodyByTermList = true;
4876   - $scope.doHighlightOrExtract = false;
4877   - }
4878   - else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayeddBR.length == 1)) {
4879   - $scope.isEligibleForHighlightBodyByTermList = true;
4880   - $scope.doHighlightOrExtract = false;
4881   - }
4882   - else {
4883   -
4884   - $scope.isEligibleForHighlightBodyByTermList = false;
4885   - }
4886   -
4887   - if ($scope.isEligibleForHighlightBodyByTermList == true) {
4888   - //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
4889   - if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
4890   - $scope.isLoading = false;
4891   -
4892   - $('#spinner').css('visibility', 'hidden');
4893   - }
4894   -
4895   - if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
4896   -
4897   - $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
4898   - }
4899   - else if ($scope.isHighlightByListManager == true) {
4900   -
4901   - // console.log('$scope.grayeddBR.length is ' + $scope.grayeddBR.length);
4902   - $timeout(function () {
4903   -
4904   - // $rootScope.isHighLight = false;
4905   - //align
4906   - // $scope.aligneCanvasWithTerm();
4907   -
4908   - $scope.HighlightBodyByTermList($scope.AllTerms)
4909   - }, 800);
4910   -
4911   - }
4912   -
4913   - if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4914   -
4915   -
4916   - //console.log('inside highlight body');
4917   -
4918   - var multiTermList = [];
4919   - angular.forEach($rootScope.previousHighlightList, function (value, key) {
4920 4818  
4921   - //debugger;
  4819 + if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
  4820 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
  4821 + $scope.isEligibleForHighlightBodyByTermList = true;
  4822 + $scope.doHighlightOrExtract = false;
  4823 + }
  4824 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
  4825 + $scope.isEligibleForHighlightBodyByTermList = true;
  4826 + $scope.doHighlightOrExtract = false;
  4827 + }
  4828 + else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
  4829 + $scope.isEligibleForHighlightBodyByTermList = true;
  4830 + $scope.doHighlightOrExtract = false;
  4831 + }
  4832 + else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
  4833 + $scope.isEligibleForHighlightBodyByTermList = true;
  4834 + $scope.doHighlightOrExtract = false;
  4835 + }
  4836 + else {
4922 4837  
4923   - var ActualTermNo = $scope.getActualTermNumber(value);
4924   - if (ActualTermNo != null) {
4925   - var TermList = $scope.getTermNumberList(ActualTermNo);
4926   - if (TermList != null) {
4927   - for (var i = 0; i < TermList.length; i++) {
  4838 + $scope.isEligibleForHighlightBodyByTermList = false;
  4839 + }
4928 4840  
4929   - multiTermList.push(TermList[i]);
4930   - }
4931   - }
4932   - }
  4841 + if ($scope.isEligibleForHighlightBodyByTermList == true) {
  4842 + //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
  4843 + if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
  4844 + $scope.isLoading = false;
4933 4845  
4934   - });
  4846 + $('#spinner').css('visibility', 'hidden');
  4847 + }
4935 4848  
  4849 + if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
4936 4850  
4937   - $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
4938   - }
  4851 + $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
  4852 + }
  4853 + else if ($scope.isHighlightByListManager == true) {
4939 4854  
  4855 + // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
  4856 + $timeout(function () {
4940 4857  
  4858 + $scope.HighlightBodyByTermList($scope.AllTerms)
  4859 + }, 800);
4941 4860  
4942 4861 }
4943 4862  
4944   - }
  4863 + }
4945 4864  
4946 4865 }
4947 4866  
4948   - $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
4949   -
4950   -
4951   - // console.log('the value of isHighlightByListManager ' + $scope.isHighlightByListManager);
4952   -
4953   - // console.log('$scope.grayeddBR.length: ' + $scope.grayeddBR.length)
4954   -
  4867 + }
4955 4868  
  4869 + $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
4956 4870  
4957 4871  
4958   - if ($rootScope.isExtract == true) {
4959   - if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
  4872 + if ($rootScope.isExtract == true) {
  4873 + if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4960 4874  
4961   - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
4962   - }
  4875 + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
4963 4876 }
4964   - else {
4965   - // 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
4966   - //and then highlight the previously selected body regions at the time of normal mode.
4967   - if ($scope.grayeddBR != null || $scope.grayeddBR != undefined) {
4968   - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayeddBR.length == 9)) {
4969   - $scope.isEligibleForHighlightBodyByTermList = true;
4970   - }
4971   - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayeddBR.length == 5)) {
4972   - $scope.isEligibleForHighlightBodyByTermList = true;
4973   - }
4974   - else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayeddBR.length == 4)) {
4975   - $scope.isEligibleForHighlightBodyByTermList = true;
4976   - }
4977   - else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayeddBR.length == 1)) {
4978   - $scope.isEligibleForHighlightBodyByTermList = true;
4979   - }
  4877 + }
  4878 + else {
  4879 + // 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
  4880 + //and then highlight the previously selected body regions at the time of normal mode.
  4881 + if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
  4882 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
  4883 + $scope.isEligibleForHighlightBodyByTermList = true;
  4884 + }
  4885 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
  4886 + $scope.isEligibleForHighlightBodyByTermList = true;
  4887 + }
  4888 + else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
  4889 + $scope.isEligibleForHighlightBodyByTermList = true;
  4890 + }
  4891 + else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
  4892 + $scope.isEligibleForHighlightBodyByTermList = true;
  4893 + }
4980 4894  
4981   - if ($scope.isEligibleForHighlightBodyByTermList == true) {
4982 4895  
4983   - if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
  4896 + }
4984 4897  
4985   - var multiTermList = [];
4986   - angular.forEach($rootScope.previousHighlightList, function (value, key) {
  4898 + //
  4899 + }
  4900 + })
4987 4901  
4988   - //debugger;
  4902 + if ($scope.isEligibleForHighlightBodyByTermList == true) {
  4903 + if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
4989 4904  
4990   - var ActualTermNo = $scope.getActualTermNumber(value);
4991   - if (ActualTermNo != null) {
4992   - var TermList = $scope.getTermNumberList(ActualTermNo);
4993   - if (TermList != null) {
4994   - for (var i = 0; i < TermList.length; i++) {
  4905 + var multiTermList = [];
  4906 + angular.forEach($rootScope.previousHighlightList, function (value, key) {
4995 4907  
4996   - multiTermList.push(TermList[i]);
4997   - }
4998   - }
4999   - }
  4908 + //debugger;
5000 4909  
5001   - });
  4910 + var ActualTermNo = $scope.getActualTermNumber(value);
  4911 + if (ActualTermNo != null) {
  4912 + var TermList = $scope.getTermNumberList(ActualTermNo);
  4913 + if (TermList != null) {
  4914 + for (var i = 0; i < TermList.length; i++) {
5002 4915  
5003   - console.log('HighlightBodyByTermList with multiTermList');
5004   - $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
  4916 + multiTermList.push(TermList[i]);
5005 4917 }
5006   -
5007 4918 }
5008 4919 }
5009 4920  
5010   - //
5011   - }
5012   - })
  4921 + });
5013 4922  
  4923 +
  4924 + $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
  4925 + }
5014 4926 }
5015 4927  
  4928 + }
5016 4929  
5017   - else {
5018   - // This code will execute when user will select normal Mode but this time isHighlight will be false
5019 4930  
5020   - angular.forEach($scope.ColoredImageSRC, function (value, key) {
5021   - var id;
5022   - if (value.haveMirror == 'true') {
5023   - id = 'imageCanvas' + value.bodyRegionId + '_MR';
5024   - }
5025   - else {
5026   - id = 'imageCanvas' + value.bodyRegionId;
5027   - }
  4931 + else {
  4932 + // This code will execute when user will select normal Mode but this time isHighlight will be false
5028 4933  
5029   - var imageCanvas = document.getElementById(id);
  4934 + angular.forEach($scope.ColoredImageSRC, function (value, key) {
  4935 + var id;
  4936 + if (value.haveMirror == 'true') {
  4937 + id = 'imageCanvas' + value.bodyRegionId + '_MR';
  4938 + }
  4939 + else {
  4940 + id = 'imageCanvas' + value.bodyRegionId;
  4941 + }
5030 4942  
5031   - //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
5032   - //var coloredCanvas = document.getElementById(coloredCanvasID);
  4943 + var imageCanvas = document.getElementById(id);
5033 4944  
5034   - var width = value.Width;
5035   - var ht = value.Height;
  4945 + //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
  4946 + //var coloredCanvas = document.getElementById(coloredCanvasID);
5036 4947  
5037   - var coloredCanvasContext = imageCanvas.getContext("2d");
5038   - var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
5039   - var coloredImageDataVar = coloredImageData;
  4948 + var width = value.Width;
  4949 + var ht = value.Height;
5040 4950  
  4951 + var coloredCanvasContext = imageCanvas.getContext("2d");
  4952 + var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
  4953 + var coloredImageDataVar = coloredImageData;
5041 4954  
5042   - if (value.haveMirror == 'true') {
5043   - $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
5044   - }
5045   - else {
5046 4955  
5047   - $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
  4956 + if (value.haveMirror == 'true') {
  4957 + $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
  4958 + }
  4959 + else {
5048 4960  
5049   - }
  4961 + $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
5050 4962  
  4963 + }
5051 4964  
5052   - var context = imageCanvas.getContext('2d');
5053 4965  
  4966 + var context = imageCanvas.getContext('2d');
5054 4967  
5055   - var dataURL = imageCanvas.toDataURL();
5056 4968  
  4969 + var dataURL = imageCanvas.toDataURL();
5057 4970  
5058   - var img = new Image();
5059 4971  
5060   - img.src = dataURL;
  4972 + var img = new Image();
5061 4973  
  4974 + img.src = dataURL;
5062 4975  
5063 4976  
5064   - img.onload = function () {
5065   - //console.log(Math.max(img.width) + ', ' + Math.max(img.height))
5066 4977  
5067   - var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
5068   - DAData.draw(img);
  4978 + img.onload = function () {
  4979 + //console.log(Math.max(img.width) + ', ' + Math.max(img.height))
5069 4980  
5070   - var colorMode;
  4981 + var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
  4982 + DAData.draw(img);
5071 4983  
5072   - if ($scope.isExtract == true) {
5073   - colorMode = $scope.applyWhiteMatrix(img, context);
5074   - }
  4984 + var colorMode;
5075 4985  
5076   - var zeroPoint = new Point();
  4986 + if ($scope.isExtract == true) {
  4987 + colorMode = $scope.applyWhiteMatrix(img, context);
  4988 + }
5077 4989  
5078   - DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
  4990 + var zeroPoint = new Point();
5079 4991  
5080   - context.putImageData(DAData.data, 0, 0)
  4992 + DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
5081 4993  
5082   - var grayImageData = context.getImageData(0, 0, width, ht);
5083   - var grayImageImageDataVar = grayImageData.data;
  4994 + context.putImageData(DAData.data, 0, 0)
5084 4995  
5085   - if ($scope.isExtract == true) {
5086   - if (value.haveMirror == 'true') {
5087   - $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
5088   - }
5089   - else {
  4996 + var grayImageData = context.getImageData(0, 0, width, ht);
  4997 + var grayImageImageDataVar = grayImageData.data;
5090 4998  
5091   - $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
5092   - }
  4999 + if ($scope.isExtract == true) {
  5000 + if (value.haveMirror == 'true') {
  5001 + $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
5093 5002 }
5094 5003 else {
5095 5004  
5096   - if (value.haveMirror == 'true') {
5097   - $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
5098   - }
5099   - else {
  5005 + $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
  5006 + }
  5007 + }
  5008 + else {
5100 5009  
5101   - $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
5102   - }
  5010 + if (value.haveMirror == 'true') {
  5011 + $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
  5012 + }
  5013 + else {
  5014 +
  5015 + $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
5103 5016 }
5104 5017 }
  5018 + }
5105 5019  
5106   - $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
5107   - })
  5020 + $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
  5021 + })
5108 5022  
5109   - if ($rootScope.isExtract == true) {
5110   - if ($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined || $rootScope.previousHighlightList.length > 0) {
  5023 + if ($rootScope.isExtract == true) {
  5024 + if ($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined || $rootScope.previousHighlightList.length > 0) {
5111 5025  
5112   - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
  5026 + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
5113 5027  
5114   - // to do
  5028 + // to do
5115 5029  
5116   - }
5117 5030 }
5118   -
5119 5031 }
  5032 +
5120 5033 }
5121   - }
  5034 + }
  5035 + }
5122 5036 }
5123 5037  
5124 5038  
... ... @@ -5477,14 +5391,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5477 5391 //console.log('reloadDABodyViewEvent');
5478 5392  
5479 5393 $scope.ReloadBodyViewId = data.reloadDABodyViewId;
5480   - // $scope.layerNumber = 0;
  5394 + // $scope.layerNumber = 0;
5481 5395 // debugger;
5482 5396  
5483 5397 $scope.loadSelectedBodyView($scope.ReloadBodyViewId);
5484 5398  
5485 5399 $scope.loadSelectedBodyViewNavigator($scope.ReloadBodyViewId);
5486 5400  
5487   -
  5401 +
5488 5402 })
5489 5403  
5490 5404 $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
... ... @@ -5898,9 +5812,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5898 5812 case "Pin":
5899 5813  
5900 5814 $rootScope.resetPin = $rootScope.ObjectIndex++;
5901   -
  5815 +
5902 5816 $rootScope.resetPinArc = $rootScope.Object1Index++;
5903   -
  5817 +
5904 5818 var radial = $('canvas').createGradient({
5905 5819 x1: 50, y1: 50,
5906 5820 x2: 50, y2: 50,
... ... @@ -5925,22 +5839,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5925 5839 // strokeWidth: 2,
5926 5840 // radius: 3
5927 5841 //},
5928   -
5929   -
5930   -
  5842 +
  5843 +
  5844 +
5931 5845 click: function (layer) {
5932   - // debugger;
5933   - PinLineName = layer.name;
5934   - _lineNameSplit = PinLineName.split("_");
5935   -
5936   - storeLine = "ArcPin_" + _lineNameSplit[1];
5937   -
5938   - $rootScope.shapeTypePin = "Pin";
5939   -
  5846 + // debugger;
  5847 + PinLineName = layer.name;
  5848 + _lineNameSplit = PinLineName.split("_");
  5849 +
  5850 + storeLine = "ArcPin_" + _lineNameSplit[1];
  5851 +
  5852 + $rootScope.shapeTypePin = "Pin";
  5853 +
5940 5854 $rootScope.canvasLayerNameCollection1 = [];
5941   -
  5855 +
5942 5856 $rootScope.canvasLayerNameCollection1.push({ a: storeLine }, { b: PinLineName });
5943   -
  5857 +
5944 5858 $('#canvas').setLayer(layer.name, {
5945 5859 handle: {
5946 5860 type: 'arc',
... ... @@ -5951,17 +5865,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5951 5865 radius: 2
5952 5866 }
5953 5867 }).drawLayers();
5954   -
  5868 +
5955 5869  
5956 5870 },
5957 5871 mouseout: function (layer) {
5958   - // $rootScope.resetPinArc = "";
5959   - // ax = "";
  5872 + // $rootScope.resetPinArc = "";
  5873 + // ax = "";
5960 5874 $rootScope.shapeTypePin = "";
5961   -
5962   - PinLineName = '';
5963   - _lineNameSplit = '';
5964   - storeLine = '';
  5875 +
  5876 + PinLineName = '';
  5877 + _lineNameSplit = '';
  5878 + storeLine = '';
5965 5879 $rootScope.canvasLayerNameCollection1 = [];
5966 5880 $('#canvas').setLayer(layer.name, {
5967 5881 handle: {
... ... @@ -5994,7 +5908,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5994 5908 }).drawArc({
5995 5909 draggable: true,
5996 5910 name: "ArcPin_" + $rootScope.resetPinArc,
5997   - // name: "Pin_" + $rootScope.resetPin,
  5911 + // name: "Pin_" + $rootScope.resetPin,
5998 5912 layer: true,
5999 5913 groups: ['shapes'],
6000 5914 dragGroups: ['shapes'],
... ... @@ -6011,13 +5925,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6011 5925 // radius: 3
6012 5926 //},
6013 5927 add: function (layer) {
6014   - // alert("add");
  5928 + // alert("add");
6015 5929 $rootScope.resetPinArc = layer.name;
6016   - // $scope.arr = [];
  5930 + // $scope.arr = [];
  5931 +
6017 5932  
6018   -
6019 5933 },
6020   -
  5934 +
6021 5935 }).drawLayers();
6022 5936 $('.btnCursor').trigger('click');
6023 5937 $(".btn-annotation").removeClass("activebtncolor");
... ... @@ -6060,22 +5974,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6060 5974  
6061 5975  
6062 5976 if (event.which == 46) {
6063   -
  5977 +
6064 5978 if ($rootScope.shapeTypePin == "Pin") {
6065 5979 // alert($rootScope.canvasLayerNameCollection[0].a);
6066 5980 // alert($rootScope.canvasLayerNameCollection[1].b);
6067 5981 for (var i = 0; i < $rootScope.canvasLayerNameCollection1.length; i++) {
6068 5982 $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[i].b).drawLayers();
6069 5983 $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[i].a).drawLayers();
6070   -
  5984 +
6071 5985 }
6072   - // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[0].a).drawLayers();
6073   - // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[1].b).drawLayers();
  5986 + // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[0].a).drawLayers();
  5987 + // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[1].b).drawLayers();
6074 5988  
6075 5989 }
6076   - // else {
6077   - $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers();
6078   - // }
  5990 + // else {
  5991 + $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers();
  5992 + // }
6079 5993  
6080 5994  
6081 5995 }
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
1 1 <!DOCTYPE html>
2 2 <html lang="en" ng-cloak ng-app="AIA">
3 3 <head>
4   - <base href="/AIAHTML5/" />
  4 + <base href="/AIA/" />
5 5 <meta charset="utf-8">
6 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7 <!--<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">-->
... ...