Commit aafbcbc052be88880dd496cb54fac80dea6814ca
1 parent
27d0ad0c
crash issue is In progress , we need to catch the enter event as well we can't fix it by ng-change.
Showing
2 changed files
with
121 additions
and
56 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -45,7 +45,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
45 | 45 | $scope.doHighlightOrExtract = false; |
46 | 46 | $scope.isEligibleForHighlightBodyByTermList = false; |
47 | 47 | |
48 | - // $scope.AnteriorView = "active"; | |
48 | + // $scope.AnteriorView = "active"; | |
49 | 49 | |
50 | 50 | $scope.zoomInOut = 75; |
51 | 51 | $scope.speechBubbleCounter = 0; |
... | ... | @@ -943,17 +943,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
943 | 943 | var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; |
944 | 944 | |
945 | 945 | //set scrollbars on canvas and hide loading label |
946 | - $('#daLoaderLabel').css('visibility', 'hidden') | |
946 | + $('#daLoaderLabel').css('visibility', 'hidden') | |
947 | 947 | |
948 | 948 | |
949 | - $('#canvasDiv').css('overflow', 'scroll') | |
950 | - if (isiOSSafari) { | |
951 | - $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) | |
949 | + $('#canvasDiv').css('overflow', 'scroll') | |
950 | + if (isiOSSafari) { | |
951 | + $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) | |
952 | 952 | |
953 | - } | |
954 | - else { | |
955 | - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) | |
956 | - } | |
953 | + } | |
954 | + else { | |
955 | + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) | |
956 | + } | |
957 | 957 | |
958 | 958 | |
959 | 959 | // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) |
... | ... | @@ -1420,16 +1420,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1420 | 1420 | |
1421 | 1421 | |
1422 | 1422 | if (isMaskImage == 'N') { |
1423 | - $scope.ColoredImageSRC.push( | |
1424 | - { | |
1425 | - "bodyRegionId": bodyRegionId, "SRC": src, | |
1426 | - "Height": h, | |
1427 | - "Width": w, | |
1428 | - "x": x, | |
1429 | - "y": y, | |
1430 | - "haveMirror": 'true' | |
1431 | - } | |
1432 | - ); | |
1423 | + | |
1424 | + if ($scope.isLayerChangeUpDown || $scope.isCalledFromEnter) { | |
1425 | + $scope.ColoredImageSRC.push( | |
1426 | + { | |
1427 | + "bodyRegionId": bodyRegionId, "SRC": src, | |
1428 | + "Height": h, | |
1429 | + "Width": w, | |
1430 | + "x": x, | |
1431 | + "y": y, | |
1432 | + "haveMirror": 'true' | |
1433 | + } | |
1434 | + ); | |
1435 | + } | |
1433 | 1436 | |
1434 | 1437 | // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) |
1435 | 1438 | |
... | ... | @@ -1454,7 +1457,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1454 | 1457 | |
1455 | 1458 | if ($scope.isEligibleForHighlight == true) |
1456 | 1459 | { |
1457 | - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1460 | + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1458 | 1461 | |
1459 | 1462 | $rootScope.isLoading = false; |
1460 | 1463 | $('#spinner').css('visibility', 'hidden'); |
... | ... | @@ -1734,6 +1737,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1734 | 1737 | |
1735 | 1738 | img.src = src; |
1736 | 1739 | |
1740 | + | |
1741 | + | |
1737 | 1742 | function start() { |
1738 | 1743 | //debugger; |
1739 | 1744 | context.drawImage(img, 0, 0); |
... | ... | @@ -1743,17 +1748,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1743 | 1748 | //do nothing |
1744 | 1749 | } |
1745 | 1750 | else { |
1746 | - $scope.ColoredImageSRC.push( | |
1747 | - { | |
1748 | - "bodyRegionId": bodyRegionId, "SRC": src, | |
1749 | - "Height": h, | |
1750 | - "Width": w, | |
1751 | - "x": x, | |
1752 | - "y": y, | |
1753 | - "haveMirror": 'false' | |
1754 | - } | |
1755 | - | |
1756 | - ); | |
1751 | + if (($scope.isLayerChangeUpDown) || ($scope.isCalledFromEnter)) { | |
1752 | + $scope.ColoredImageSRC.push( | |
1753 | + { | |
1754 | + "bodyRegionId": bodyRegionId, "SRC": src, | |
1755 | + "Height": h, | |
1756 | + "Width": w, | |
1757 | + "x": x, | |
1758 | + "y": y, | |
1759 | + "haveMirror": 'false' | |
1760 | + } | |
1761 | + | |
1762 | + ); | |
1763 | + } | |
1757 | 1764 | |
1758 | 1765 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
1759 | 1766 | |
... | ... | @@ -1851,10 +1858,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1851 | 1858 | |
1852 | 1859 | if ($rootScope.isListManagerSelected) { |
1853 | 1860 | |
1854 | - multiTermList = $scope.AllTerms; | |
1861 | + multiTermList = $scope.AllTerms; | |
1855 | 1862 | |
1856 | - } | |
1857 | - else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { | |
1863 | + } | |
1864 | + else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { | |
1858 | 1865 | angular.forEach($rootScope.previousHighlightList, function (value, key) { |
1859 | 1866 | |
1860 | 1867 | var ActualTermNo = $scope.getActualTermNumber(value); |
... | ... | @@ -2414,10 +2421,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2414 | 2421 | $scope.LayerChange = function () { |
2415 | 2422 | |
2416 | 2423 | |
2417 | - //if listanager is visisble then close it | |
2418 | - $rootScope.isListManagerSelected = false; | |
2424 | + //if listanager is visisble then close it | |
2425 | + $rootScope.isListManagerSelected = false; | |
2419 | 2426 | |
2420 | - $rootScope.CloseListManager(); | |
2427 | + $rootScope.CloseListManager(); | |
2421 | 2428 | |
2422 | 2429 | |
2423 | 2430 | |
... | ... | @@ -2506,6 +2513,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2506 | 2513 | } |
2507 | 2514 | |
2508 | 2515 | else { |
2516 | + | |
2517 | + if ($scope.isLayerChangeUpDown) | |
2518 | + { | |
2519 | + $scope.isCalledFromEnter = false; | |
2520 | + } | |
2521 | + else | |
2522 | + { | |
2523 | + $scope.isCalledFromEnter = true; | |
2524 | + } | |
2525 | + | |
2509 | 2526 | //1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box. |
2510 | 2527 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
2511 | 2528 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { |
... | ... | @@ -2516,6 +2533,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2516 | 2533 | else |
2517 | 2534 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); |
2518 | 2535 | |
2536 | + //$scope.isMousUp(); | |
2537 | + | |
2538 | + //alert('$scope.currentLayerNumber'); | |
2539 | + | |
2519 | 2540 | $rootScope.isLoading = true; |
2520 | 2541 | $('#spinner').css('visibility', 'visible'); |
2521 | 2542 | var canDiv = document.getElementById('canvasDiv'); |
... | ... | @@ -2524,6 +2545,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2524 | 2545 | canDiv.innerHTML = ''; |
2525 | 2546 | } |
2526 | 2547 | |
2548 | + | |
2549 | + | |
2527 | 2550 | //2. |
2528 | 2551 | $scope.CalculateImageCordinates($rootScope.viewOrientationId); |
2529 | 2552 | |
... | ... | @@ -2543,6 +2566,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2543 | 2566 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); |
2544 | 2567 | } |
2545 | 2568 | |
2569 | + $scope.LayerChangeOnMouseUpDown = function (e) | |
2570 | + { | |
2571 | + $scope.isLayerChangeUpDown = true; | |
2572 | + $scope.LayerChange(); | |
2573 | + | |
2574 | + } | |
2575 | + | |
2576 | + | |
2546 | 2577 | $scope.DisableProgressBar = function () { |
2547 | 2578 | |
2548 | 2579 | // alert('Disabled wait cursor is called'); |
... | ... | @@ -3406,8 +3437,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3406 | 3437 | |
3407 | 3438 | //if listanager is visisble then close it |
3408 | 3439 | |
3409 | - $rootScope.isListManagerSelected = false; | |
3410 | - $rootScope.CloseListManager(); | |
3440 | + $rootScope.isListManagerSelected = false; | |
3441 | + $rootScope.CloseListManager(); | |
3411 | 3442 | |
3412 | 3443 | |
3413 | 3444 | $scope.isTransparencyActivated = true; |
... | ... | @@ -3427,6 +3458,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3427 | 3458 | |
3428 | 3459 | canvasDiv.addEventListener("mouseup", mouseUpListener) |
3429 | 3460 | |
3461 | + | |
3430 | 3462 | } |
3431 | 3463 | |
3432 | 3464 | function mouseDownListener(e) { |
... | ... | @@ -3511,6 +3543,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3511 | 3543 | // $selection.remove(); |
3512 | 3544 | // debugger; |
3513 | 3545 | |
3546 | + //alert('mouse up'); | |
3547 | + console.log('MOUSE UP'); | |
3548 | + | |
3514 | 3549 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); |
3515 | 3550 | $('.rectangle').remove(); |
3516 | 3551 | |
... | ... | @@ -3813,7 +3848,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3813 | 3848 | //do nothing |
3814 | 3849 | } |
3815 | 3850 | else if (isLayerChanged) { |
3816 | - // debugger | |
3851 | + | |
3852 | + // alert('isMousUp on isLayerChanged'); | |
3853 | + | |
3817 | 3854 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
3818 | 3855 | |
3819 | 3856 | } |
... | ... | @@ -4803,7 +4840,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4803 | 4840 | |
4804 | 4841 | //if listanager is visisble then close it |
4805 | 4842 | |
4806 | - // $rootScope.isListManagerSelected = false; | |
4843 | + // $rootScope.isListManagerSelected = false; | |
4807 | 4844 | $rootScope.CloseListManager(); |
4808 | 4845 | |
4809 | 4846 | if ($rootScope.isHighLight == true) { |
... | ... | @@ -4864,10 +4901,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4864 | 4901 | console.log('enableNormalMode is called'); |
4865 | 4902 | |
4866 | 4903 | |
4867 | - // $rootScope.isHighLight = false; | |
4904 | + // $rootScope.isHighLight = false; | |
4868 | 4905 | |
4869 | - //to do should not call every time | |
4870 | - $rootScope.CloseListManager(); | |
4906 | + //to do should not call every time | |
4907 | + $rootScope.CloseListManager(); | |
4871 | 4908 | |
4872 | 4909 | |
4873 | 4910 | if ($rootScope.isNormalMode == true) { |
... | ... | @@ -4928,7 +4965,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4928 | 4965 | |
4929 | 4966 | //if listanager is visisble then close it |
4930 | 4967 | |
4931 | - // $rootScope.isListManagerSelected = false; | |
4968 | + // $rootScope.isListManagerSelected = false; | |
4932 | 4969 | $rootScope.CloseListManager(); |
4933 | 4970 | //1. |
4934 | 4971 | $rootScope.isLoading = true; |
... | ... | @@ -5213,7 +5250,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5213 | 5250 | else if ($rootScope.isListManagerSelected == true) { |
5214 | 5251 | console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') |
5215 | 5252 | |
5216 | - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5253 | + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5217 | 5254 | |
5218 | 5255 | } |
5219 | 5256 | } |
... | ... | @@ -5376,7 +5413,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5376 | 5413 | console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') |
5377 | 5414 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); |
5378 | 5415 | |
5379 | - } | |
5416 | + } | |
5380 | 5417 | } |
5381 | 5418 | |
5382 | 5419 | } |
... | ... | @@ -5458,8 +5495,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5458 | 5495 | |
5459 | 5496 | //if listanager is visisble then close it |
5460 | 5497 | |
5461 | - $rootScope.isListManagerSelected = false; | |
5462 | - $rootScope.CloseListManager(); | |
5498 | + $rootScope.isListManagerSelected = false; | |
5499 | + $rootScope.CloseListManager(); | |
5463 | 5500 | |
5464 | 5501 | $rootScope.isLoading = true; |
5465 | 5502 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -5778,13 +5815,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5778 | 5815 | $scope.$on('reloadDABodyViewEvent', function (event, data) { |
5779 | 5816 | //console.log('reloadDABodyViewEvent'); |
5780 | 5817 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
5781 | - //$scope.ReloadBodyViewId = data.reloadDABodyViewId; | |
5782 | - // $scope.layerNumber = 0; | |
5783 | - // debugger; | |
5784 | - | |
5785 | - //console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); | |
5818 | + //alert('mouseUp'); | |
5786 | 5819 | |
5787 | - //if ($rootScope.isSettingEventAlredayDispachted == true) { | |
5820 | + | |
5788 | 5821 | |
5789 | 5822 | $scope.loadSelectedBodyView(data.reloadDABodyViewId); |
5790 | 5823 | |
... | ... | @@ -5797,6 +5830,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5797 | 5830 | |
5798 | 5831 | }) |
5799 | 5832 | |
5833 | + //$scope.isMousUp= function() | |
5834 | + //{ | |
5835 | + // // alert('isMousUp is called '); | |
5836 | + | |
5837 | + // $(".item:input").bind('keyup click', function (e) { | |
5838 | + // //doing something | |
5839 | + // if(e.keyCode == 38) { //Enter keycode | |
5840 | + | |
5841 | + // alert("up") | |
5842 | + // }else if(e.keyCode == 40){ | |
5843 | + // alert("down"); | |
5844 | + // } else { | |
5845 | + // $("input").change(function() { | |
5846 | + // if (a> $("input").val()) { | |
5847 | + // alert("down"); | |
5848 | + // a = $("input").val(); | |
5849 | + // } else | |
5850 | + // { | |
5851 | + // a = $("input").val(); | |
5852 | + // alert("up"); | |
5853 | + // } | |
5854 | + | |
5855 | + // }); | |
5856 | + // } | |
5857 | + | |
5858 | + | |
5859 | + // }); | |
5860 | + // } | |
5861 | + | |
5862 | + | |
5863 | + | |
5864 | + | |
5800 | 5865 | $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { |
5801 | 5866 | |
5802 | 5867 | //$rootScope.voId = currentBodyViewId; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -222,7 +222,7 @@ |
222 | 222 | </div> |
223 | 223 | <div class=""> |
224 | 224 | <p> |
225 | - <input type="number" id="txtlayerNumber" value="0" step="1" min="0" style="width:80px; margin:10px 0 0 15px;" ng-model="layerNumber" ng-change="LayerChange()" /> | |
225 | + <input class="item" type="number" id="txtlayerNumber" value="0" step="1" min="0" style="width:80px; margin:10px 0 0 15px;" ng-model="layerNumber" ng-change="LayerChange()" ng-click="LayerChangeOnMouseUpDown($event)" /> | |
226 | 226 | </p> |
227 | 227 | <div id="layerChangeSlider" style="height:140px;" class="vert_slider " ng-model="layerNumber"></div> |
228 | 228 | </div> | ... | ... |