Commit 1dffdd09467688369b7dcd3bd820d349cfbfa0ef
Merge branch 'scrollbarissuezoom' into Develop
Showing
1 changed file
with
26 additions
and
4 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2760,9 +2760,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2760 | 2760 | |
2761 | 2761 | else { |
2762 | 2762 | |
2763 | - var canvasDiv = document.getElementById('canvasDiv'); | |
2764 | - $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition); | |
2765 | - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); | |
2763 | + | |
2764 | + if ($rootScope.isZoomed) { | |
2765 | + var lastSelectedAnnotation; | |
2766 | + angular.forEach($rootScope.previousHighlightList, function (value, key) { | |
2767 | + var ActualTermNos = $scope.getActualTermNumber(value); | |
2768 | + lastSelectedAnnotation = ActualTermNos; | |
2769 | + }); | |
2770 | + | |
2771 | + $scope.TermList = $scope.getTermNumberList(lastSelectedAnnotation); | |
2772 | + $scope.termCoordinate = $scope.getTermCoordinate(lastSelectedAnnotation); | |
2773 | + | |
2774 | + console.log('last selected Annotation= ' + lastSelectedAnnotation); | |
2775 | + console.log('termListCount= ' + $scope.TermList.length); | |
2776 | + console.log('termCoordinate= ' + $scope.termCoordinate.x); | |
2777 | + | |
2778 | + | |
2779 | + | |
2780 | + $scope.aligneCanvasWithTerm(); | |
2781 | + } | |
2782 | + else { | |
2783 | + | |
2784 | + var canvasDiv = document.getElementById('canvasDiv'); | |
2785 | + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition); | |
2786 | + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition); | |
2787 | + } | |
2766 | 2788 | } |
2767 | 2789 | |
2768 | 2790 | $rootScope.isLoading = false; |
... | ... | @@ -2773,7 +2795,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2773 | 2795 | |
2774 | 2796 | } |
2775 | 2797 | } |
2776 | - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2); | |
2798 | + | |
2777 | 2799 | |
2778 | 2800 | |
2779 | 2801 | }; | ... | ... |