diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 0ad0b3a..585df94 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2760,9 +2760,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else { - var canvasDiv = document.getElementById('canvasDiv'); - $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition); - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); + + if ($rootScope.isZoomed) { + var lastSelectedAnnotation; + angular.forEach($rootScope.previousHighlightList, function (value, key) { + var ActualTermNos = $scope.getActualTermNumber(value); + lastSelectedAnnotation = ActualTermNos; + }); + + $scope.TermList = $scope.getTermNumberList(lastSelectedAnnotation); + $scope.termCoordinate = $scope.getTermCoordinate(lastSelectedAnnotation); + + console.log('last selected Annotation= ' + lastSelectedAnnotation); + console.log('termListCount= ' + $scope.TermList.length); + console.log('termCoordinate= ' + $scope.termCoordinate.x); + + + + $scope.aligneCanvasWithTerm(); + } + else { + + var canvasDiv = document.getElementById('canvasDiv'); + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition); + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); + } } $rootScope.isLoading = false; @@ -2773,7 +2795,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2); + };