diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 5dc429f..42a05f5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -45,7 +45,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.doHighlightOrExtract = false; $scope.isEligibleForHighlightBodyByTermList = false; - // $scope.AnteriorView = "active"; + // $scope.AnteriorView = "active"; $scope.zoomInOut = 75; $scope.speechBubbleCounter = 0; @@ -943,17 +943,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; //set scrollbars on canvas and hide loading label - $('#daLoaderLabel').css('visibility', 'hidden') + $('#daLoaderLabel').css('visibility', 'hidden') - $('#canvasDiv').css('overflow', 'scroll') - if (isiOSSafari) { - $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) + $('#canvasDiv').css('overflow', 'scroll') + if (isiOSSafari) { + $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) - } - else { - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) - } + } + else { + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) + } // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) @@ -1420,16 +1420,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (isMaskImage == 'N') { - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'true' - } - ); + + if ($scope.isLayerChangeUpDown || $scope.isCalledFromEnter) { + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'true' + } + ); + } // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) @@ -1454,7 +1457,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.isEligibleForHighlight == true) { - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); @@ -1734,6 +1737,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo img.src = src; + + function start() { //debugger; context.drawImage(img, 0, 0); @@ -1743,17 +1748,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //do nothing } else { - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'false' - } - - ); + if (($scope.isLayerChangeUpDown) || ($scope.isCalledFromEnter)) { + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'false' + } + + ); + } if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { @@ -1851,10 +1858,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.isListManagerSelected) { - multiTermList = $scope.AllTerms; + multiTermList = $scope.AllTerms; - } - else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { + } + else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { angular.forEach($rootScope.previousHighlightList, function (value, key) { var ActualTermNo = $scope.getActualTermNumber(value); @@ -2414,10 +2421,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.LayerChange = function () { - //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; + //if listanager is visisble then close it + $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + $rootScope.CloseListManager(); @@ -2506,6 +2513,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } else { + + if ($scope.isLayerChangeUpDown) + { + $scope.isCalledFromEnter = false; + } + else + { + $scope.isCalledFromEnter = true; + } + //1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box. var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { @@ -2516,6 +2533,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); + //$scope.isMousUp(); + + //alert('$scope.currentLayerNumber'); + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); var canDiv = document.getElementById('canvasDiv'); @@ -2524,6 +2545,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo canDiv.innerHTML = ''; } + + //2. $scope.CalculateImageCordinates($rootScope.viewOrientationId); @@ -2543,6 +2566,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); } + $scope.LayerChangeOnMouseUpDown = function (e) + { + $scope.isLayerChangeUpDown = true; + $scope.LayerChange(); + + } + + $scope.DisableProgressBar = function () { // alert('Disabled wait cursor is called'); @@ -3406,8 +3437,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + $rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); $scope.isTransparencyActivated = true; @@ -3427,6 +3458,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo canvasDiv.addEventListener("mouseup", mouseUpListener) + } function mouseDownListener(e) { @@ -3511,6 +3543,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // $selection.remove(); // debugger; + //alert('mouse up'); + console.log('MOUSE UP'); + $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); $('.rectangle').remove(); @@ -3813,7 +3848,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //do nothing } else if (isLayerChanged) { - // debugger + + // alert('isMousUp on isLayerChanged'); + $scope.layerNumber = parseInt($('#txtlayerNumber').val()); } @@ -4803,7 +4840,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - // $rootScope.isListManagerSelected = false; + // $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); if ($rootScope.isHighLight == true) { @@ -4864,10 +4901,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('enableNormalMode is called'); - // $rootScope.isHighLight = false; + // $rootScope.isHighLight = false; - //to do should not call every time - $rootScope.CloseListManager(); + //to do should not call every time + $rootScope.CloseListManager(); if ($rootScope.isNormalMode == true) { @@ -4928,7 +4965,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - // $rootScope.isListManagerSelected = false; + // $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); //1. $rootScope.isLoading = true; @@ -5213,7 +5250,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else if ($rootScope.isListManagerSelected == true) { console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); } } @@ -5376,7 +5413,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); - } + } } } @@ -5458,8 +5495,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + $rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -5778,13 +5815,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.$on('reloadDABodyViewEvent', function (event, data) { //console.log('reloadDABodyViewEvent'); $scope.layerNumber = parseInt($('#txtlayerNumber').val()); - //$scope.ReloadBodyViewId = data.reloadDABodyViewId; - // $scope.layerNumber = 0; - // debugger; - - //console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); + //alert('mouseUp'); - //if ($rootScope.isSettingEventAlredayDispachted == true) { + $scope.loadSelectedBodyView(data.reloadDABodyViewId); @@ -5797,6 +5830,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }) + //$scope.isMousUp= function() + //{ + // // alert('isMousUp is called '); + + // $(".item:input").bind('keyup click', function (e) { + // //doing something + // if(e.keyCode == 38) { //Enter keycode + + // alert("up") + // }else if(e.keyCode == 40){ + // alert("down"); + // } else { + // $("input").change(function() { + // if (a> $("input").val()) { + // alert("down"); + // a = $("input").val(); + // } else + // { + // a = $("input").val(); + // alert("up"); + // } + + // }); + // } + + + // }); + // } + + + + $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { //$rootScope.voId = currentBodyViewId; 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 5141c95..8509b7a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -222,7 +222,7 @@

- +