diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 4db223d..2e558f1 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -9525,35 +9525,22 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.LayerChangeBasedOnKeyPressed = function (e) {
- // Dissectible Anatomy > Should not display blank page if no layer is selected.
-
- // alert('key down')
- //if (e.keyCode == 13) {
-
- // 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.keyCode == 38) {
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;
+
}
else {
+
$("#txtlayerNumber").val($rootScope.totalLayers);
}
@@ -9562,12 +9549,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// 'x' button is displaying inside the input box in IE browser.
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;
+
}
}
@@ -9576,7 +9565,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LayerValueChangeBasedOnKeyUp = function (e) {
- // alert('key up')
+
if (e.keyCode == 13) {
if ($("#txtlayerNumber").val() == '') {
@@ -9584,9 +9573,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
}
else {
- $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
-
+ $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
@@ -9596,7 +9584,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
else {
if (keyUplayerNumber > $rootScope.totalLayers) {
-
+
$("#txtlayerNumber").val($rootScope.totalLayers);
$scope.layerNumber = parseInt($rootScope.totalLayers);
@@ -9614,13 +9602,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
var layerInputVal = $("#txtlayerNumber").val();
- if (layerInputVal < $rootScope.totalLayers) {
- //var layerInputValInc = parseInt(layerInputVal) + 1;
- //$scope.layerNumber = parseInt(layerInputValInc);
+
+ if (layerInputVal <= $rootScope.totalLayers) {
+
$("#txtlayerNumber").val(layerInputVal);
- //$rootScope.PreviouslayerNumbr = $scope.layerNumber;
+
}
else {
+
$("#txtlayerNumber").val($rootScope.totalLayers);
}
}