Commit 7d3c6213ec264603e300b7d91010981948417ab6

Authored by Nikita Kulshreshtha
1 parent 80a5a093

Changed the place of assigning tottalLayers in the current view.

This resolves the issue because certain terms ar present at max layer mumber and when view is cahnged the totallayer number value is assigned later and layerNumber for serach was assigned before that
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -604,6 +604,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -604,6 +604,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
604 $rootScope.bgartData = e.data.bodyArtData; 604 $rootScope.bgartData = e.data.bodyArtData;
605 $rootScope.BodyLayerData = e.data.bodyLayerData; 605 $rootScope.BodyLayerData = e.data.bodyLayerData;
606 606
  607 + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
  608 +
  609 + //set max for LayerNumber input
  610 + $rootScope.totalLayers = dataLength - 1;
  611 + // debugger
  612 + $('#txtLayerNumber').attr('max', $rootScope.totalLayers);
  613 + $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers);
  614 +
607 $scope.isBodylayerdataLoaded = true; 615 $scope.isBodylayerdataLoaded = true;
608 616
609 $scope.LoadDefaultLayerImage(); 617 $scope.LoadDefaultLayerImage();
@@ -1078,11 +1086,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -1078,11 +1086,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1078 1086
1079 var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; 1087 var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
1080 1088
1081 - //set max for LayerNumber input  
1082 - $rootScope.totalLayers = dataLength - 1;  
1083 - // debugger  
1084 - $('#txtLayerNumber').attr('max', $rootScope.totalLayers);  
1085 - $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); 1089 +
1086 // $('#layerChangeSlider').slider("option", "value",parseInt($rootScope.totalLayers)-parseInt($scope.layerNumber)); 1090 // $('#layerChangeSlider').slider("option", "value",parseInt($rootScope.totalLayers)-parseInt($scope.layerNumber));
1087 1091
1088 $scope.one = 1; 1092 $scope.one = 1;
@@ -5946,6 +5950,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5946,6 +5950,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5946 //debugger; 5950 //debugger;
5947 5951
5948 $rootScope.BodyLayerData = result; 5952 $rootScope.BodyLayerData = result;
  5953 +
  5954 + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
  5955 +
  5956 + //set max for LayerNumber input
  5957 + $rootScope.totalLayers = dataLength - 1;
  5958 +
  5959 + $('#txtLayerNumber').attr('max', $rootScope.totalLayers);
  5960 + $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers);
  5961 +
  5962 + //set max for LayerNumber input
  5963 + $rootScope.totalLayers = dataLength - 1;
  5964 +
5949 $scope.isBodylayerdataLoaded = true; 5965 $scope.isBodylayerdataLoaded = true;
5950 5966
5951 //load json for annotations 5967 //load json for annotations