diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 9995c7c..aa5bf72 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1943,8 +1943,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.HighlightBodyOnExtract = function () {
console.log(' insode HighlightBodyOnExtract. $rootScope.MaskCanvasData length= ' + $rootScope.MaskCanvasData.length + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length)
+ //terminate previous running workers to create space for new workers
+ $scope.layerNumber = $('#txtlayerNumber').val();
+ $scope.terminateCurrentlyRunningWPs();
+
var multiTermList = [];
var CallBackBodyRegion = [];
+ var selectedAnnotation;
if ($rootScope.isListManagerSelected) {
@@ -1955,6 +1960,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
angular.forEach($rootScope.previousHighlightList, function (value, key) {
var ActualTermNo = $scope.getActualTermNumber(value);
+ selectedAnnotation = ActualTermNo;
if (ActualTermNo != null) {
var TermList = $scope.getTermNumberList(ActualTermNo);
if (TermList != null) {
@@ -1968,16 +1974,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
});
}
- //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);
-
+ //get term list to get term coordinates
+ $scope.TermList = $scope.getTermNumberList(selectedAnnotation);
- //terminate previous running workers to create space for new workers
- $scope.layerNumber = $('#txtlayerNumber').val();
- $scope.terminateCurrentlyRunningWPs();
+ $scope.termCoordinate = $scope.getTermCoordinate(selectedAnnotation);
+
+
$timeout(function () {
@@ -2076,7 +2078,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
grayCanvasContext.putImageData(updatedData, 0, 0);
-
//to resolve lateral arm black issue in highlight mode
if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) {
@@ -2098,6 +2099,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
grayCanvasContext.putImageData(imgData, 0, 0);
}
+ CallBackBodyRegion.push(bodyRegionId);
+
+ $scope.doAligneCanvasWithTerm = false;
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && (CallBackBodyRegion.length == 9)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && (CallBackBodyRegion.length == 5)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && (CallBackBodyRegion.length == 1)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && (CallBackBodyRegion.length == 1)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+
if ($rootScope.multiAnnotationIsON == true) {
@@ -2125,8 +2142,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// }
//}
+ if ($scope.doAligneCanvasWithTerm == true) {
+ $scope.aligneCanvasWithTerm()
+ }
$timeout(function () { $scope.DisableProgressBar() }, 1000);
+
};
@@ -4903,10 +4924,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isNormalMode = false;
- //$rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
-
- //$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
-
//if listanager is visisble then close it
$rootScope.CloseListManager();
@@ -4946,16 +4963,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//3.
- if ($rootScope.isExtract == true) {
-
-
- $("#canvasDiv").scrollTop($rootScope.canavsDivTop);
-
- $("#canvasDiv").scrollLeft($rootScope.canavsDivLeft);
-
- console.log('$rootScope.CanvasDivTopPosition= ' + $rootScope.CanvasDivTopPosition + 'and $rootScope.CanvasDivLeftPosition= ' + $rootScope.CanvasDivLeftPosition)
- }
- else {
+
if ($scope.zoomInOut == 25) {
if ($('#canvasDiv') != null)
$('#canvasDiv').scrollLeft(0)
@@ -4968,7 +4976,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- }
+
//remove annotation speech bubble
if ($('#dot').length > 0) {
$('#dot').remove();
@@ -5271,7 +5279,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#canvasDiv").scroll(function (event) {
$rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
- console.log('scroll event. $rootScope.CanvasDivTopPosition= ' + $rootScope.CanvasDivTopPosition + ' and $rootScope.CanvasDivLeftPosition= ' + $rootScope.CanvasDivLeftPosition)
});
@@ -5288,11 +5295,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
- //befoe extracr scroll pos
- $rootScope.canavsDivTop = $("#canvasDiv").scrollTop();
- $rootScope.canavsDivLeft = $("#canvasDiv").scrollLeft();
-
-
+
if ($scope.isTransparencyActivated == true) {
$("#btnExtract").addClass("disabled");