diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 1be2e7c..ec91638 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2639,30 +2639,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); } - + $rootScope.PreviouslayerNumbr = 0; $scope.LayerChangeOnMouseUpDown = function (e) { //'x' button is displaying inside the input box in IE browser. if (e.currentTarget.id == "incrmntVal") { + //Dissectible Anatomy > Inappropriate Text in Layer Input box. + if ($("#txtlayerNumber").val() == '') { + var layerInputVal = 0; + + var layerInputValInc = parseInt(layerInputVal); + $scope.layerNumber = parseInt(layerInputValInc); + $("#txtlayerNumber").val($scope.layerNumber); + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; + + } + else { + var layerInputVal = $("#txtlayerNumber").val(); + if (layerInputVal != $rootScope.totalLayers) { + var layerInputValInc = parseInt(layerInputVal) + 1; + $scope.layerNumber = parseInt(layerInputValInc); + $("#txtlayerNumber").val($scope.layerNumber); + $rootScope.PreviouslayerNumbr = $scope.layerNumber; + } - var layerInputVal = $("#txtlayerNumber").val(); - if (layerInputVal != $rootScope.totalLayers) { - var layerInputValInc = parseInt(layerInputVal) + 1; - $scope.layerNumber = parseInt(layerInputValInc); - $("#txtlayerNumber").val($scope.layerNumber); } } else { - var layerInputVal = $("#txtlayerNumber").val(); - if (layerInputVal > 0) { - var layerInputValDec = parseInt(layerInputVal) - 1; + //Dissectible Anatomy > Inappropriate Text in Layer Input box. + if ($("#txtlayerNumber").val() == '') { + var layerInputVal = 0; + var layerInputValDec = parseInt(layerInputVal); $scope.layerNumber = parseInt(layerInputValDec); $("#txtlayerNumber").val($scope.layerNumber); - } - + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; + } + else + { + var layerInputVal = $("#txtlayerNumber").val(); + if (layerInputVal > 0) { + var layerInputValDec = parseInt(layerInputVal) - 1; + $scope.layerNumber = parseInt(layerInputValDec); + $("#txtlayerNumber").val($scope.layerNumber); + $rootScope.PreviouslayerNumbr = $scope.layerNumber; + } + } + } $scope.LayerChange(); @@ -8332,15 +8357,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }); } - + $scope.LayerChangeBasedOnKeyPressed = function (e) { - + // Dissectible Anatomy > Should not display blank page if no layer is selected. + + if (e.keyCode == 13) { - $scope.LayerChange(); + + if ($("#txtlayerNumber").val() == '') + { + + $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); + } + else + { + $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); + $scope.LayerChange(); + } + + } // 'x' button is displaying inside the input box in IE browser. - if (e.which == 38) { + if (e.keyCode == 38) { var layerInputVal = $("#txtlayerNumber").val(); @@ -8348,26 +8387,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var layerInputValInc = parseInt(layerInputVal) + 1; $scope.layerNumber = parseInt(layerInputValInc); $("#txtlayerNumber").val($scope.layerNumber); + $rootScope.PreviouslayerNumbr = $scope.layerNumber; } } // 'x' button is displaying inside the input box in IE browser. - if (e.which == 40) { + if (e.keyCode == 40) { var layerInputVal = $("#txtlayerNumber").val(); if (layerInputVal > 0) { var layerInputValDec = parseInt(layerInputVal) - 1; $scope.layerNumber = parseInt(layerInputValDec); $("#txtlayerNumber").val($scope.layerNumber); + $rootScope.PreviouslayerNumbr = $scope.layerNumber; } } - } - + $scope.LayerValueChangeBasedOnKeyUp = function (e) { + + var keyUplayerNumber = parseInt($("#txtlayerNumber").val()); + + if (isNaN(keyUplayerNumber)) + { + + } + else { + + if (keyUplayerNumber > $rootScope.totalLayers) { + + $("#txtlayerNumber").val($rootScope.totalLayers); + $scope.layerNumber = parseInt($rootScope.totalLayers); + + } + else { + + $("#txtlayerNumber").val(keyUplayerNumber); + $scope.layerNumber = parseInt(keyUplayerNumber); + + + } + + } + + + } + }] diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index e309d6a..4a2c408 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -253,7 +253,7 @@