diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index eb1e6ac..4db223d 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -9527,32 +9527,35 @@ 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 (e.keyCode == 13) {
+ // if ($("#txtlayerNumber").val() == '') {
- if ($("#txtlayerNumber").val() == '') {
+ // $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
+ // }
+ // else {
+ // $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
+ // $scope.LayerChange();
- $("#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) {
+ 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);
+ }
}
@@ -9573,31 +9576,54 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LayerValueChangeBasedOnKeyUp = function (e) {
- var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
-
- if (isNaN(keyUplayerNumber))
- {
- document.getElementById("txtlayerNumber").value = "";
- }
- else {
-
- if (keyUplayerNumber > $rootScope.totalLayers) {
+ // alert('key up')
+ if (e.keyCode == 13) {
- $("#txtlayerNumber").val($rootScope.totalLayers);
- $scope.layerNumber = parseInt($rootScope.totalLayers);
+ if ($("#txtlayerNumber").val() == '') {
+ $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
}
else {
+ $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
- $("#txtlayerNumber").val(keyUplayerNumber);
- $scope.layerNumber = parseInt(keyUplayerNumber);
- }
+ var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
- }
+ if (isNaN(keyUplayerNumber)) {
+ document.getElementById("txtlayerNumber").value = "";
+ }
+ else {
+
+ if (keyUplayerNumber > $rootScope.totalLayers) {
+
+ $("#txtlayerNumber").val($rootScope.totalLayers);
+ $scope.layerNumber = parseInt($rootScope.totalLayers);
+
+ }
+ else {
+
+ $("#txtlayerNumber").val(keyUplayerNumber);
+ $scope.layerNumber = parseInt(keyUplayerNumber);
+ }
+ $scope.LayerChange();
+ }
+ }
+ }
+ else {
+ var layerInputVal = $("#txtlayerNumber").val();
+ if (layerInputVal < $rootScope.totalLayers) {
+ //var layerInputValInc = parseInt(layerInputVal) + 1;
+ //$scope.layerNumber = parseInt(layerInputValInc);
+ $("#txtlayerNumber").val(layerInputVal);
+ //$rootScope.PreviouslayerNumbr = $scope.layerNumber;
+ }
+ else {
+ $("#txtlayerNumber").val($rootScope.totalLayers);
+ }
+ }
}