Commit d5e4cc4be9beb52deba2684a3f1692db62282e1d
1 parent
c08a6de0
Dissectible Anatomy > Inappropriate Text in Layer Input box.
Showing
1 changed file
with
28 additions
and
8 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -2642,26 +2642,46 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2642,26 +2642,46 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2642 | 2642 | ||
2643 | $scope.LayerChangeOnMouseUpDown = function (e) { | 2643 | $scope.LayerChangeOnMouseUpDown = function (e) { |
2644 | //'x' button is displaying inside the input box in IE browser. | 2644 | //'x' button is displaying inside the input box in IE browser. |
2645 | - | 2645 | + |
2646 | if (e.currentTarget.id == "incrmntVal") { | 2646 | if (e.currentTarget.id == "incrmntVal") { |
2647 | + //Dissectible Anatomy > Inappropriate Text in Layer Input box. | ||
2648 | + if ($("#txtlayerNumber").val() == '') { | ||
2649 | + var layerInputVal = 0; | ||
2647 | 2650 | ||
2648 | - var layerInputVal = $("#txtlayerNumber").val(); | ||
2649 | - if (layerInputVal != $rootScope.totalLayers) { | ||
2650 | - var layerInputValInc = parseInt(layerInputVal) + 1; | 2651 | + var layerInputValInc = parseInt(layerInputVal); |
2651 | $scope.layerNumber = parseInt(layerInputValInc); | 2652 | $scope.layerNumber = parseInt(layerInputValInc); |
2652 | $("#txtlayerNumber").val($scope.layerNumber); | 2653 | $("#txtlayerNumber").val($scope.layerNumber); |
2654 | + | ||
2655 | + } | ||
2656 | + else { | ||
2657 | + var layerInputVal = $("#txtlayerNumber").val(); | ||
2658 | + if (layerInputVal != $rootScope.totalLayers) { | ||
2659 | + var layerInputValInc = parseInt(layerInputVal) + 1; | ||
2660 | + $scope.layerNumber = parseInt(layerInputValInc); | ||
2661 | + $("#txtlayerNumber").val($scope.layerNumber); | ||
2662 | + } | ||
2663 | + | ||
2653 | } | 2664 | } |
2654 | 2665 | ||
2655 | } | 2666 | } |
2656 | else { | 2667 | else { |
2657 | 2668 | ||
2658 | - var layerInputVal = $("#txtlayerNumber").val(); | ||
2659 | - if (layerInputVal > 0) { | ||
2660 | - var layerInputValDec = parseInt(layerInputVal) - 1; | 2669 | + //Dissectible Anatomy > Inappropriate Text in Layer Input box. |
2670 | + if ($("#txtlayerNumber").val() == '') { | ||
2671 | + var layerInputVal = 0; | ||
2672 | + var layerInputValDec = parseInt(layerInputVal); | ||
2661 | $scope.layerNumber = parseInt(layerInputValDec); | 2673 | $scope.layerNumber = parseInt(layerInputValDec); |
2662 | $("#txtlayerNumber").val($scope.layerNumber); | 2674 | $("#txtlayerNumber").val($scope.layerNumber); |
2663 | - } | ||
2664 | 2675 | ||
2676 | + } | ||
2677 | + else { | ||
2678 | + var layerInputVal = $("#txtlayerNumber").val(); | ||
2679 | + if (layerInputVal > 0) { | ||
2680 | + var layerInputValDec = parseInt(layerInputVal) - 1; | ||
2681 | + $scope.layerNumber = parseInt(layerInputValDec); | ||
2682 | + $("#txtlayerNumber").val($scope.layerNumber); | ||
2683 | + } | ||
2684 | + } | ||
2665 | 2685 | ||
2666 | } | 2686 | } |
2667 | $scope.LayerChange(); | 2687 | $scope.LayerChange(); |