Commit f60300ed5f0283d15cfed885eb2925fe44e7f211

Authored by Nikita Kulshreshtha
1 parent cf84a672

Patially resolved.

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -2128,6 +2128,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2128 2128  
2129 2129 $timeout(function () { $scope.DisableProgressBar() }, 1000);
2130 2130  
  2131 +
2131 2132 };
2132 2133 worker.onerror = function (e) {
2133 2134 alert('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message);
... ... @@ -4899,6 +4900,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4899 4900 $rootScope.isTransparencyBoxActivated = false;
4900 4901 $rootScope.isNormalMode = false;
4901 4902  
  4903 +
  4904 + //$rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
  4905 +
  4906 + //$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
4902 4907  
4903 4908 //if listanager is visisble then close it
4904 4909  
... ... @@ -4930,21 +4935,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4930 4935 }
4931 4936 else {
4932 4937 $scope.zoomInOut = 25;
  4938 +
  4939 +
4933 4940 }
4934 4941  
4935 4942 //2.
4936 4943 $scope.CalculateImageCordinates($rootScope.viewOrientationId);
4937 4944  
4938 4945 //3.
4939   - if ($scope.zoomInOut == 25) {
4940   - if ($('#canvasDiv') != null)
4941   - $('#canvasDiv').scrollLeft(0)
  4946 +
  4947 + if ($rootScope.isExtract == true) {
  4948 +
  4949 +
  4950 + $("#canvasDiv").scrollTop($rootScope.canavsDivTop);
  4951 +
  4952 + $("#canvasDiv").scrollLeft($rootScope.canavsDivLeft);
  4953 +
  4954 + console.log('$rootScope.CanvasDivTopPosition= ' + $rootScope.CanvasDivTopPosition + 'and $rootScope.CanvasDivLeftPosition= ' + $rootScope.CanvasDivLeftPosition)
4942 4955 }
4943 4956 else {
4944   - if ($('#canvasDiv') != null)
4945   - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
4946   - }
  4957 + if ($scope.zoomInOut == 25) {
  4958 + if ($('#canvasDiv') != null)
  4959 + $('#canvasDiv').scrollLeft(0)
  4960 +
  4961 + }
  4962 + else {
  4963 + if ($('#canvasDiv') != null)
  4964 + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
4947 4965  
  4966 +
  4967 + }
  4968 +
  4969 + }
4948 4970 //remove annotation speech bubble
4949 4971 if ($('#dot').length > 0) {
4950 4972 $('#dot').remove();
... ... @@ -5247,6 +5269,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5247 5269 $("#canvasDiv").scroll(function (event) {
5248 5270 $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
5249 5271 $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
  5272 + console.log('scroll event. $rootScope.CanvasDivTopPosition= ' + $rootScope.CanvasDivTopPosition + ' and $rootScope.CanvasDivLeftPosition= ' + $rootScope.CanvasDivLeftPosition)
5250 5273  
5251 5274 });
5252 5275  
... ... @@ -5263,6 +5286,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5263 5286  
5264 5287 $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
5265 5288  
  5289 + //befoe extracr scroll pos
  5290 + $rootScope.canavsDivTop = $("#canvasDiv").scrollTop();
  5291 + $rootScope.canavsDivLeft = $("#canvasDiv").scrollLeft();
5266 5292  
5267 5293  
5268 5294 if ($scope.isTransparencyActivated == true) {
... ...