diff --git a/.gitignore b/.gitignore index e7c26cd..6e642df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,38 +1,38 @@ -# git ignore file -[Bb]in/ -[Dd]ebug*/ -*.lib -Thumbs.db -obj/ -*.obj -*.exe -*.pdb -*.user -*.aps -*.pch -*.vspscc -*_i.c -*_p.c -*.ncb -*.suo -*.sln.docstates -*.tlb -*.tlh -*.bak -*.cache -*.ilk -*.log -[Bb]in -[Dd]ebug*/ -*.lib -*.sbr -obj/ -[Rr]elease*/ -_ReSharper*/ -[Tt]est[Rr]esult* -*.vssscc -$tf*/ -400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user +# git ignore file +[Bb]in/ +[Dd]ebug*/ +*.lib +Thumbs.db +obj/ +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.sln.docstates +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +*.vssscc +$tf*/ +400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user 300-PROTOTYPES/POC/AIAHTML5 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js.orig 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js.orig diff --git a/400-SOURCECODE/AIAHTML5.Web/Web.config b/400-SOURCECODE/AIAHTML5.Web/Web.config index bc7bc85..a0ae78c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/Web.config +++ b/400-SOURCECODE/AIAHTML5.Web/Web.config @@ -17,6 +17,9 @@ + + + @@ -27,13 +30,14 @@ - + + - + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 068bd70..6748a3e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -6,12 +6,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.CAAllBodyRegion = []; $scope.CAAllBodySystem = []; $scope.CAAllSpeciality = []; - $scope.selectedCAlistViewData = []; - $scope.searchCAlistViewData = []; + $scope.selectedCAListViewData = []; + $scope.searchCAListViewData = []; $scope.SelectedCAthumbImage = []; $scope.SelectedCAImage = []; $scope.SelectedCASummary = []; $scope.filterstring = false; + $scope.query = { + selectedbodyregion: null, + selectedbodysystem: null, + selectedspecialty: null, + }; $scope.$on('$viewContentLoaded', function (event) { // code that will be executed ... @@ -28,15 +33,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B promise.then( function (result) { $scope.AnimationData = result; - $scope.selectedCAlistViewData = $scope.AnimationData.root.CAData; + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; + + $scope.selectedCAListViewData = new jinqJs() + .from($scope.AnimationData.root.CAData) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select(); + + //console.log($scope.selectedCAListViewData); $('#grid-view').empty(); - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -70,7 +82,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B var SelectedCAthumbImage = []; SelectedCAthumbImage = new jinqJs() - .from($scope.selectedCAlistViewData) + .from($scope.selectedCAListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -82,11 +94,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B } else { - if ($scope.searchCAlistViewData.length > 0) { + if ($scope.searchCAListViewData.length > 0) { var SelectedCAthumbImage = []; SelectedCAthumbImage = new jinqJs() - .from($scope.searchCAlistViewData) + .from($scope.searchCAListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -101,22 +113,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.Reset = function (query) { - query.selectedbodyregion = ""; - query.selectedbodysystem = ""; - query.selectedspecialty = ""; + query.selectedbodyregion = null; + query.selectedbodysystem = null; + query.selectedspecialty = null; $scope.filterstring = false; - while ($scope.searchCAlistViewData.length) { - $scope.searchCAlistViewData.pop(); + while ($scope.searchCAListViewData.length) { + $scope.searchCAListViewData.pop(); } $('#grid-view').empty(); - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; - var $el = $('
' - + '
' - + '' - + '

' + value._Title + '

').appendTo('#grid-view'); + var $el = $('
' + + '
' + + '' + + '

' + value._Title + '

').appendTo('#grid-view'); $compile($el)($scope); @@ -130,12 +142,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B } + // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file. $scope.ApplySearch = function (query) { $scope.filterstring = true; - while ($scope.searchCAlistViewData.length) { - $scope.searchCAlistViewData.pop(); + while ($scope.searchCAListViewData.length) { + $scope.searchCAListViewData.pop(); } $('#grid-view').empty(); @@ -151,7 +164,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B filtercount = filtercount + 1; } - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { var selectimg = true; var count = 0; @@ -199,10 +212,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; - var $el = $('
' - + '
' - + '' - + '

' + value._Title + '

').appendTo('#grid-view'); + var $el = $('
' + + '
' + + '' + + '

' + value._Title + '

').appendTo('#grid-view'); $compile($el)($scope); @@ -213,7 +226,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B }); - $scope.searchCAlistViewData.push( + $scope.searchCAListViewData.push( { "_id": value._id, "_ImageId": value._ImageId, @@ -231,6 +244,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCAListViewData.length == 0) { + + var $el = $('
No animation found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } } @@ -248,12 +268,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { var CITitle = []; CITitle = new jinqJs() - .from($scope.selectedCAlistViewData) + .from($scope.selectedCAListViewData) .where('_id = ' + $event.currentTarget.id) .select('_Title'); //console.log(CITitle); - //console.log($scope.selectedCAlistViewData); + //console.log($scope.selectedCAListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 9531e59..c2b8a5b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -8,14 +8,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.CIAllOrientation = []; $scope.CIAllImageType = []; $scope.CIAllSpeciality = []; - $scope.searchCIlistViewData = []; + $scope.searchCIListViewData = []; $scope.SelectedCIthumbImage = []; $scope.SelectedCIImage = []; $scope.SelectedCISummary = []; $scope.SelectedCIId = []; $scope.SelectedCITitle = []; - $scope.selectedCIlistViewData = []; + $scope.selectedCIListViewData = []; $scope.filterstring = false; + $scope.query = { + selectedbodyregion: null, + selectedbodysystem: null, + selectedorientation: null, + selectedimagetype: null, + selectedspecialty: null, + }; $scope.$on('$viewContentLoaded', function (event) { // code that will be executed ... @@ -36,14 +43,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout promise.then( function (result) { $scope.IllustrationData = result; - $scope.selectedCIlistViewData = $scope.IllustrationData.root.CIData; + //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; + + $scope.selectedCIListViewData = new jinqJs() + .from($scope.IllustrationData.root.CIData) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select(); $('#grid-view').empty(); - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -77,7 +89,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var SelectedCIthumbImage = []; SelectedCIthumbImage = new jinqJs() - .from($scope.selectedCIlistViewData) + .from($scope.selectedCIListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -88,11 +100,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - if ($scope.searchCIlistViewData.length > 0) { + if ($scope.searchCIListViewData.length > 0) { var SelectedCIthumbImage = []; SelectedCIthumbImage = new jinqJs() - .from($scope.searchCIlistViewData) + .from($scope.searchCIListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -107,21 +119,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.Reset = function (query) { - query.selectedbodyregion = ""; - query.selectedbodysystem = ""; - query.selectedorientation = ""; - query.selectedimagetype = ""; - query.selectedspecialty = ""; + //query.selectedbodyregion = ""; + //query.selectedbodysystem = ""; + //query.selectedorientation = ""; + //query.selectedimagetype = ""; + //query.selectedspecialty = ""; + query.selectedbodyregion = null; + query.selectedbodysystem = null; + query.selectedorientation = null; + query.selectedimagetype = null; + query.selectedspecialty = null; + $scope.filterstring = false; - while ($scope.searchCIlistViewData.length) { - $scope.searchCIlistViewData.pop(); + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); } $('#grid-view').empty(); - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -142,8 +160,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.filterstring = true; - while ($scope.searchCIlistViewData.length) { - $scope.searchCIlistViewData.pop(); + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); } $('#grid-view').empty(); @@ -165,7 +183,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout filtercount = filtercount + 1; } - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { var selectimg = true; var count = 0; @@ -239,7 +257,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -253,7 +271,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); - $scope.searchCIlistViewData.push( + $scope.searchCIListViewData.push( { "_id": value._id, "_ImageId": value._ImageId, @@ -273,6 +291,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCIListViewData.length == 0) { + + var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } } @@ -290,12 +315,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { var CITitle = []; CITitle = new jinqJs() - .from($scope.selectedCIlistViewData) + .from($scope.selectedCIListViewData) .where('_id = ' + $event.currentTarget.id) .select('_Title'); // console.log(CITitle); - // console.log($scope.selectedCIlistViewData); + // console.log($scope.selectedCIListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 5594e29..ba1c54b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.imagePath = ""; $rootScope.BodyRegionData; $rootScope.BodyRegionCordinatesData; - $scope.isTransparencyActivated; + $scope.isTransparencyActivated = false; $rootScope.BodyLayerData; $rootScope.VocabTermData; @@ -84,7 +84,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.updatedWhiteImageMRDataList = []; //normal mode - $rootScope.isNormalMode = false; + $rootScope.isNormalMode = true; $rootScope.isZoomed = false; //navigator man functionality @@ -165,7 +165,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //get the DA body view list based on selected gender $scope.getDAViewList = function ($event) { - + if ($('#MainImage') != null) { $('#MainImage').remove(); } @@ -244,7 +244,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; - + var $el = $('
' + '' @@ -265,7 +265,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.openView = function ($event) { - + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -422,6 +422,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //0.1 var currentBodyViewId = localStorage.getItem("currentBodyViewId"); + $scope.loadSearchDataForBodyView(); + + console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); var openViews; @@ -499,7 +502,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //1. load navigator man first $scope.LoadBodyViewNavigatorImage(); - $scope.loadSearchDataForBodyView(); + //$scope.loadSearchDataForBodyView(); $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); @@ -525,7 +528,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.loadSearchDataForBodyView = function () { - + console.log('loadSearchDataForBodyView'); var currentBodyViewId = localStorage.getItem("currentBodyViewId"); @@ -682,7 +685,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.LoadDefaultLayerImage = function () { - + $rootScope.isNormalMode = true; $scope.layerNumber = 0; @@ -724,6 +727,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //calculate coordinates for body region images $scope.CalculateImageCordinates = function (viewOrientationId) { + // annotation toolbar canvas + if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { + + $("#canvasDiv").append(''); + $scope.BindCanvasDrawingListners(); + // $rootScope.FreeStylePaint(); + + } + $scope.terminateCurrentlyRunningWPs(); var drawnBodyRegionCount = []; @@ -945,7 +957,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //set scrollbars on canvas and hide loading label $('#daLoaderLabel').css('visibility', 'hidden') - + $('#canvasDiv').css('overflow', 'scroll') if (isiOSSafari) { $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) @@ -954,7 +966,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else { $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) } - + // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) $('#canvasDiv').scrollTop(50) @@ -966,40 +978,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. // #4976 :While changing gender male to female scroll bar is going on top. var canvasDiv = document.getElementById('canvasDiv'); - canvasDiv.scrollTop = 0; + if (canvasDiv != null || canvasDiv != undefined) { + canvasDiv.scrollTop = 0; - //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image - var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image + //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image - if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) { + var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image - var dragdivw = 42 - $scope.dragdivleft = 21; - $scope.dragdivtop = 0; + if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) { - $scope.dragdivposition = { - "left": 21, - "top": 0 - }; - } - else { - var dragdivw = 83; + var dragdivw = 42 + $scope.dragdivleft = 21; + $scope.dragdivtop = 0; - $scope.dragdivleft = 0; - $scope.dragdivtop = 0; + $scope.dragdivposition = { + "left": 21, + "top": 0 + }; + } + else { + var dragdivw = 83; - $scope.dragdivposition = { - "left": 0, - "top": 0 + $scope.dragdivleft = 0; + $scope.dragdivtop = 0; - }; + $scope.dragdivposition = { + "left": 0, + "top": 0 + + }; + } } - + $('#draggable').css('width', dragdivw); $('#draggable').css('height', dragdivh) + } function scaleRectangle(x, y, height, width, mirrorValue) { @@ -1059,7 +1075,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.GetImageSource = function (bodyRegionId) { - + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; //set max for LayerNumber input @@ -1077,7 +1093,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.userInput = parseInt($scope.layerNumber); - + $scope.skinTone = $rootScope.globalSetting.ethnicity; var SelectedLayerData = []; @@ -1139,7 +1155,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.GetBackgroundImgSource = function (bodyRegionId) { - + var selectedGender; if (localStorage.getItem("genderId") == "Male") { @@ -1157,7 +1173,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.bagartBodyRegionDetails != null || $scope.bagartBodyRegionDetails != undefined) { //filter bodyRegion data basd on skintone - $scope.skinTone = $rootScope.globalSetting.ethnicity + $scope.skinTone = $rootScope.globalSetting.ethnicity $scope.bagartDetailsOnSktn = new jinqJs() .from($scope.bagartBodyRegionDetails) .where('_Skintone == ' + $scope.skinTone) @@ -1193,11 +1209,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo FlipedImgCanvas.style.left = x + "px"; FlipedImgCanvas.style.top = y + "px"; - + if (isMaskImage == 'Y') { + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'; - FlipedImgCanvas.style.visibility = 'hidden' + FlipedImgCanvas.style.visibility = 'hidden'; + } else { @@ -1218,6 +1236,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo FlipedImgCanvas.addEventListener('click', function (evt) { + //to get correct data on multihighlight highlight if ($scope.isLayerChange == true) { $scope.isLayerChange = false; @@ -1294,6 +1313,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } var RGBColor = (Red + Green + Blue); + $rootScope.previousHighlightList.push(RGBColor); + + if ($rootScope.isHighLight) { if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { @@ -1331,15 +1353,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - $rootScope.previousHighlightList.push(RGBColor); + // $rootScope.previousHighlightList.push(RGBColor); $scope.highLightBodyBasedOnIcolor(RGBColor); } - if ($rootScope.isNormalMode == true) { + //if ($rootScope.isNormalMode == true) { + + // $rootScope.previousHighlightList.push(RGBColor); + //} - $rootScope.previousHighlightList.push(RGBColor); + //extarct clicked body part is extarct button is already enabled. + // debugger; + if ($rootScope.isExtract == true) { + $scope.enableExtract(false); } var annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); @@ -1417,22 +1445,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo context.scale(-1, 1); context.drawImage(img, 0, 0); context.restore(); + + + if (isMaskImage == 'N') { - if (isMaskImage == 'N') { + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'true' + } + ); - - $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) @@ -1455,9 +1483,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.isEligibleForHighlight = false; } - if ($scope.isEligibleForHighlight == true) - { - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { + if ($scope.isEligibleForHighlight == true) { + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $scope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) { $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1489,9 +1516,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo ); } }; - + + if (document.getElementById('canvasDiv') != null) document.getElementById('canvasDiv').appendChild(FlipedImgCanvas); + + @@ -1619,6 +1649,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } + $rootScope.previousHighlightList.push(RGBColor); if ($rootScope.isHighLight == true) { if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { @@ -1657,7 +1688,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - $rootScope.previousHighlightList.push(RGBColor); + // $rootScope.previousHighlightList.push(RGBColor); if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { } @@ -1668,8 +1699,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - if ($rootScope.isNormalMode == true) { - $rootScope.previousHighlightList.push(RGBColor); + //if ($rootScope.isNormalMode == true) { + // $rootScope.previousHighlightList.push(RGBColor); + //} + + // debugger; + //extarct clisked body part is extarct button is already enabled. + if ($rootScope.isExtract == true) { + $scope.enableExtract(false); } if ($('#speechBubbleTrns').length > 0) @@ -1733,30 +1770,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo img.src = src; - + function start() { - //debugger; + context.drawImage(img, 0, 0); + + if (isMaskImage == 'N') { if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { //do nothing } else { - - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'false' - } - - ); - + + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'false' + } + + ); + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { @@ -1776,15 +1815,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.isEligibleForHighlight = false; } - if ($scope.isEligibleForHighlight == true) - { - - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { + if ($scope.isEligibleForHighlight == true) { + + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $scope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) { $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; @@ -1793,7 +1831,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.highLightBody(); console.log('just after highLightBody call'); - + } } } @@ -1844,16 +1882,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.HighlightBodyOnExtract = function () { + console.log(' insode HighlightBodyOnExtract. $rootScope.MaskCanvasData length= ' + $rootScope.MaskCanvasData.length + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) - var multiTermList = []; var CallBackBodyRegion = []; if ($rootScope.isListManagerSelected) { - + multiTermList = $scope.AllTerms; - - } + + } else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { angular.forEach($rootScope.previousHighlightList, function (value, key) { @@ -1879,7 +1917,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //terminate previous running workers to create space for new workers - + $scope.layerNumber = $('#txtlayerNumber').val(); $scope.terminateCurrentlyRunningWPs(); $timeout(function () { @@ -1967,7 +2005,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var canvasId = (e.data.canvasId).replace('_mci', ''); - //debugger; + //for (var i = 1; i <= updatedData.length; i++) { var grayCanvasID = canvasId; @@ -2003,7 +2041,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.multiAnnotationIsON == true) { - //debugger; + if (canvasId.match('_MR')) $rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData; else @@ -2052,6 +2090,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // $rootScope.updatedGrayDataList = null; // $rootScope.updatedGrayDataList = []; //} + + $scope.layerNumber = $('#txtlayerNumber').val(); + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -2205,7 +2246,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var bodyRegionId = e.data.bodyRegionId; var canvasId = (e.data.canvasId).replace('_mci', ''); - //debugger; + //for (var i = 1; i <= updatedData.length; i++) { var grayCanvasID = canvasId; @@ -2225,7 +2266,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - //debugger; + if (canvasId.match('_MR')) { $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; @@ -2257,14 +2298,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } if ($scope.doAligneCanvasWithTerm == true) { - //debugger; - if ($scope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) + + if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); - $scope.isHighlightBodyByBodySystem = false; + // $rootScope.isHighlightBodyByBodySystem = false; if ($rootScope.isListManagerSelected == true) $scope.aligneCanvasWithTerm(); @@ -2288,9 +2329,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var multiTermList = []; angular.forEach($rootScope.previousHighlightList, function (value, key) { - - //debugger; - var ActualTermNo = $scope.getActualTermNumber(value); if (ActualTermNo != null) { var TermList = $scope.getTermNumberList(ActualTermNo); @@ -2351,8 +2389,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //get annotation from term number $scope.GetAnnotationText = function (termNumber) { - //debugger; - + var annotationText; //0 var figLeafTermNo = 5868; // to do declare constant for this @@ -2387,8 +2424,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { - // debugger; - + var Annotation; $scope.ActualTermNo = actualTermNo; if ($rootScope.VocabTermData != null || $rootScope.VocabTermData != undefined) { @@ -2416,10 +2452,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //layer change function $scope.LayerChange = function () { - + //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; - + // $rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); @@ -2435,13 +2471,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; - // debugger; // $('#daLoaderLabel').css('visibility', 'visible'); - if ($scope.isTransparencyActivated) { - + //crete temp canavs to store the original data which will be used to chnange the transparency if (document.getElementById('tempCanvas') != null) { $('#tempCanvas').remove(); @@ -2463,7 +2497,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (document.getElementById('canvasDiv') != null) document.getElementById('canvasDiv').appendChild(tempCanvas); - // //debugger; + var tCanvas = document.getElementById('transparencyCanvas'); var tCanvasContext = tCanvas.getContext('2d'); @@ -2510,7 +2544,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else { - + //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)) { @@ -2542,11 +2576,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) - if ($scope.isHighlightBodyByBodySystem) { + + if ($rootScope.isHighlightBodyByBodySystem) { $timeout(function () { $scope.DisableProgressBar() }, 20000); } - else - { + else { $timeout(function () { $scope.DisableProgressBar() }, 2000); } } @@ -2554,9 +2588,30 @@ 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.LayerChangeOnMouseUpDown = function (e) { + //'x' button is displaying inside the input box in IE browser. + + if (e.currentTarget.id == "incrmntVal") { + + var layerInputVal = $("#txtlayerNumber").val(); + if (layerInputVal != $rootScope.totalLayers) { + var layerInputValInc = parseInt(layerInputVal) + 1; + $scope.layerNumber = parseInt(layerInputValInc); + $("#txtlayerNumber").val($scope.layerNumber); + } + + } + else { + + var layerInputVal = $("#txtlayerNumber").val(); + if (layerInputVal > 0) { + var layerInputValDec = parseInt(layerInputVal) - 1; + $scope.layerNumber = parseInt(layerInputValDec); + $("#txtlayerNumber").val($scope.layerNumber); + } + + + } $scope.LayerChange(); } @@ -2594,6 +2649,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } console.log('highLightBody call from DisableProgressBar') + // $scope.highLightBody(); @@ -2633,6 +2689,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) { + //debugger; if (isAnnotationForTBox == true) { //1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that // we decide the size of speech bubble @@ -2704,8 +2761,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $(".com").css("display", "none"); $("#bord").css({ "width": "0px", "display": "none" }); var sppechBubbleDotHTML = '' - + '