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