diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 7316890..04dfd66 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1319,28 +1319,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- $scope.highLightBodyBasedOnIcolor = function (RGBColor)
- {
+ $scope.highLightBodyBasedOnIcolor = function (RGBColor) {
+
+ if ($scope.previousSelectedTermList.length > 0) {
+
+ //alert('previousSelectedTermList length: ' + $scope.previousSelectedTermList.length);
+
+ for (var i = 0; i < $scope.previousSelectedTermList.length; i++) {
+ var RGBColor = $scope.previousSelectedTermList[i];
+
+
+
+ //2. Find Actul Term No Based on Icolor.
+ var ActualTermNo = $scope.getActualTermNumber(RGBColor);
+
+ //3. Find Term No List Based on ActualTermNo
+ var TermList = $scope.getTermNumberList(ActualTermNo);
- //2. Find Actul Term No Based on Icolor.
- var ActualTermNo = $scope.getActualTermNumber(RGBColor);
-
- //3. Find Term No List Based on ActualTermNo
- var TermList = $scope.getTermNumberList(ActualTermNo);
-
- //4.
+ //4.
- $scope.machedTermNoLocation = [];
- for (var i = 0; i < TermList.length; i++) {
+ $scope.machedTermNoLocation = [];
+ for (var i = 0; i < TermList.length; i++) {
- var termNumber = parseInt(TermList[i]._TermNumber);
+ var termNumber = parseInt(TermList[i]._TermNumber);
- //Match Term No List in each bodyRegion
- $scope.getLocationsForMatchedTermsInWholeBody(termNumber);
+ //Match Term No List in each bodyRegion
+ $scope.getLocationsForMatchedTermsInWholeBody(termNumber);
+ }
+ }
+ }
+ else {
+ //2. Find Actul Term No Based on Icolor.
+ var ActualTermNo = $scope.getActualTermNumber(RGBColor);
+
+ //3. Find Term No List Based on ActualTermNo
+ var TermList = $scope.getTermNumberList(ActualTermNo);
+
+
+ //4.
+
+ $scope.machedTermNoLocation = [];
+ for (var i = 0; i < TermList.length; i++) {
+
+ var termNumber = parseInt(TermList[i]._TermNumber);
+
+ //Match Term No List in each bodyRegion
+ $scope.getLocationsForMatchedTermsInWholeBody(termNumber);
+ }
}
}
+
+
$scope.getLocationsForMatchedTermsInWholeBody = function (termNo)
{
@@ -1502,7 +1533,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
-
+ // grayCanvasContext.putImageData(grayImageData, 0, 0);
}
grayCanvasContext.putImageData(grayImageData, 0, 0);
@@ -3193,11 +3224,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.enableHighlight = function () {
- $rootScope.isHighLight = true;
- // alert('enableHighlight is called');
+ if ($rootScope.isHighLight == true)
+ {
+
+ }
+ else
+ {
+ $rootScope.isHighLight = true;
+ $scope.highLightBody();
+ }
- $scope.highLightBody();
+
}
@@ -3291,23 +3329,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
- $timeout(function () { imageCanvas.style.visibility = 'visible' }, 250);
+ $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
});
- //alert('length: ' + $scope.previousSelectedTermList.length);
-
- if ($scope.previousSelectedTermList.length > 0) {
-
- //alert('previousSelectedTermList length: ' + $scope.previousSelectedTermList.length);
-
- for (var i = 0; i < $scope.previousSelectedTermList.length; i++) {
- $scope.highLightBodyBasedOnIcolor($scope.previousSelectedTermList[i]);
-
- }
- }
+
+
}