diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 66194e1..9dbb176 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1392,8 +1392,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($scope.isEligibleForHighlight == true) {
if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
- $rootScope.isLoading = false;
- $('#spinner').css('visibility', 'hidden');
+ //$rootScope.isLoading = false;
+ //$('#spinner').css('visibility', 'hidden');
$rootScope.isLoading = true;
@@ -2151,6 +2151,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
grayCanvasContext.putImageData(updatedData, 0, 0);
$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId });
+
+ console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length)
+
+ if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) {
+
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.highlightedBR.length == 9)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.highlightedBR.length == 5)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.highlightedBR.length == 1)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.highlightedBR.length == 1)) {
+ $scope.doAligneCanvasWithTerm = true;
+ }
+
+ if ($scope.doAligneCanvasWithTerm == true) {
+ //debugger;
+ if ($scope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true)
+
+ $rootScope.isLoading = false;
+
+ $('#spinner').css('visibility', 'hidden');
+
+ $scope.isHighlightBodyByBodySystem = false;
+
+ if ($rootScope.isListManagerSelected == true)
+ $scope.aligneCanvasWithTerm();
+ }
+ }
}
//debugger;
@@ -2167,37 +2199,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId });
- console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length)
-
- if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) {
-
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.highlightedBR.length == 9)) {
- $scope.doAligneCanvasWithTerm = true;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.highlightedBR.length == 5)) {
- $scope.doAligneCanvasWithTerm = true;
- }
- else if ((($rootScope.viewOrientationId == '5')) && ($scope.highlightedBR.length == 4)) {
- $scope.doAligneCanvasWithTerm = true;
- }
- else if ((($rootScope.viewOrientationId == '6')) && ($scope.highlightedBR.length == 1)) {
- $scope.doAligneCanvasWithTerm = true;
- }
-
- if ($scope.doAligneCanvasWithTerm == true) {
- //debugger;
- if ($scope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true)
-
- $rootScope.isLoading = false;
-
- $('#spinner').css('visibility', 'hidden');
-
- $scope.isHighlightBodyByBodySystem = false;
-
- if ($rootScope.isListManagerSelected == true)
- $scope.aligneCanvasWithTerm();
- }
- }
+
//
};
@@ -5088,7 +5090,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
}
else if ($rootScope.isListManagerSelected == true) {
+ $scope.isLoading = true;
+ $('#spinner').css('visibility', 'visible');
// console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
$timeout(function () {
@@ -6970,9 +6974,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$compile($elem)($scope);
})
-
-
-
+
+ $('#viewName').empty();
var currentView = localStorage.getItem("currentViewTitle");
var viewNmeHtml = ''
$('#viewName').append(viewNmeHtml);
@@ -7240,28 +7243,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var canvasX = parseInt($('#canvasDiv').css('left'));
var canvasY = parseInt($('#canvasDiv').css('top'));
- var canvasWidth = parseInt($('#canvasDiv').css('width'));
- var canvasHeight = parseInt($('#canvasDiv').css('height'));
+ //var canvasWidth = parseInt($('#canvasDiv').css('width'));
+ // var canvasHeight = parseInt($('#canvasDiv').css('height'));
+
+
+ var canvasHeight = $('#canvasDiv').height();
+ var canvasWidth = $('#canvasDiv').width();
+
var canvasBottom = canvasY + canvasHeight;
var canvasRight = canvasX + canvasWidth
+ if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom){
+ //if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) {
+
+ //}
+ //else {
- if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) {
- }
- else {
+
+ console.log('aligneCanvasWithTerm IF')
+ console.log('aligneCanvasWithTerm ELSE')
newX = newX - canvasWidth / 2;
newY = newY - canvasHeight / 2;
+ var maxVScrollPos = $('#canvasDiv')[0].scrollHeight;
+ var maxHScrollPos = $('#canvasDiv')[0].scrollWidth;
+
+ if (newY < maxVScrollPos) {
+ newY = newY;
+ }
+ else {
+ newY = maxVScrollPos;
+ }
+
+ //Conditions checked for Horizontal Scroll Position
+ if (newX < maxHScrollPos) {
+ newX = newX;
+ }
+ else {
+ newX = maxHScrollPos;
+ }
+
+ $('#canvasDiv').scrollLeft(newX);
+ $('#canvasDiv').scrollTop(newY);
+
}
console.log('newX =' + newX + ',newY= ' + newY)
- $('#canvasDiv').scrollLeft(newX);
- $('#canvasDiv').scrollTop(newY);
-
+
+ $scope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
}
$scope.scaleValue = function (nValue, nNewZoom, nExistingZoom) {