From 7d3c6213ec264603e300b7d91010981948417ab6 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 10 Oct 2016 13:14:19 +0530 Subject: [PATCH] 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 | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index cd084df..10cffee 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -604,6 +604,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.bgartData = e.data.bodyArtData; $rootScope.BodyLayerData = e.data.bodyLayerData; + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; + + //set max for LayerNumber input + $rootScope.totalLayers = dataLength - 1; + // debugger + $('#txtLayerNumber').attr('max', $rootScope.totalLayers); + $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); + $scope.isBodylayerdataLoaded = true; $scope.LoadDefaultLayerImage(); @@ -1078,11 +1086,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; - //set max for LayerNumber input - $rootScope.totalLayers = dataLength - 1; - // debugger - $('#txtLayerNumber').attr('max', $rootScope.totalLayers); - $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); + // $('#layerChangeSlider').slider("option", "value",parseInt($rootScope.totalLayers)-parseInt($scope.layerNumber)); $scope.one = 1; @@ -5946,6 +5950,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //debugger; $rootScope.BodyLayerData = result; + + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; + + //set max for LayerNumber input + $rootScope.totalLayers = dataLength - 1; + + $('#txtLayerNumber').attr('max', $rootScope.totalLayers); + $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); + + //set max for LayerNumber input + $rootScope.totalLayers = dataLength - 1; + $scope.isBodylayerdataLoaded = true; //load json for annotations -- libgit2 0.21.4