diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 001ac48..ee7d194 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -3,7 +3,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) { - console.log('DAController initialized') + $scope.genderId = ""; $scope.BodyViewData; $scope.selectedGenderBodyViewData; @@ -367,11 +367,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .orderBy([{ field: '_TermText', sort: 'asc' }]) .select('_ActualTermNumber', '_TermText', '_cdId'); - //$scope.VocabTermTxt = vocabTermTxt; - - //console.log(vocabTermTxt); - //console.log($scope.TermNumberData); - //console.log($scope.VocabTermTxt); + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitleFromJson"); @@ -385,25 +381,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log(data); }); - // var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json'; - - // //load vocabterm data - // //$http({ method: 'GET', url: '~/../content/data/json/cm_dat_vocabterm_1.json' }).success(function (data) { - // $http({ method: 'GET', url: path }).success(function (data) { - - // $scope.VocabTermData = data; - // $scope.VocabTermTxt = $scope.VocabTermData.VocabTerms.Term; - // //console.log($scope.VocabTermTxt); - - // }) - //.error(function (data, status, headers, config) { - // console.log(data); - //}); + var openViews; - // debugger; if ($rootScope.openViews.length > 0) { openViews = new jinqJs() .from($rootScope.openViews) @@ -412,7 +394,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } var counter = 1; - // var tittle = $rootScope.ViewTitle; var tittle = localStorage.getItem("currentViewTitleFromJson"); if (openViews != null && openViews.length > 0) { @@ -525,17 +506,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .from($scope.NavigatorData.Navigtor.ViewOrientation) .where("_ViewOrientationId == " + $rootScope.currentBodyViewId) .select(); - console.log(navdtlOrient); - console.log(navdtlOrient[0].ImageInfo); + var navOrientationdata = new jinqJs() .from(navdtlOrient[0].ImageInfo) .where("_Ethnicity == " + $scope.skinTone) .select(); - //console.log(navOrientationdata); + $scope.NavOrientationdata = navOrientationdata; - console.log("$scope.NavOrientationdata: "); - console.log($scope.NavOrientationdata); + var navimagemodesty; @@ -616,7 +595,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //calculate coordinates for body region images $scope.CalculateImageCordinates = function (viewOrientationId) { - console.log('CalculateImageCordinates'); + //remove the previous layer mask data from array var n = $rootScope.MaskCanvasData.length @@ -1547,11 +1526,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.highLightBodyBasedOnIcolor = function (RGBColor) { - // console.log(' $scope.highLightBodyBasedOnIcolor') - - - - + //2. Find Actul Term No Based on Icolor. var ActualTermNo = $scope.getActualTermNumber(RGBColor); @@ -1604,15 +1579,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var n = $rootScope.MaskCanvasData.length; - //console.log('$rootScope.MaskCanvasData.length= ' + n) - - // console.log('Start time taken for term: ' + TermList[i]._TermNumber + 'in posting: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); - //debugger + $timeout(function () { for (var x = 0; x < 9; x++) { - // console.log('$rootScope.MaskCanvasData.length= ' + n) - //debugger + var bodyRegionId = $rootScope.MaskCanvasData[x].bodyRegionId; var canvasId = $rootScope.MaskCanvasData[x].canvasId; @@ -1625,13 +1596,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (canvasId.match('_MR')) { coloredImageDataVar = $rootScope.coloredImageMRCanvasList[bodyRegionId]; - //alert('is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON); - - //if ($rootScope.multiAnnotationIsON == true) { - - // white = $rootScope.updatedWhiteImageMRDataList[bodyRegionId] - //} - //else + white = $rootScope.whiteImageMRDataList[bodyRegionId]; } @@ -1639,24 +1604,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo coloredImageDataVar = $rootScope.coloredImageCanvasList[bodyRegionId - 1]; - //alert('is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON); - //if ($rootScope.multiAnnotationIsON == true) { - - // //if (($rootScope.updatedWhiteImageDataList[bodyRegionId - 1]) != null && ($rootScope.updatedWhiteImageDataList[bodyRegionId - 1].length>0)) { - // if (($rootScope.updatedWhiteImageDataList[bodyRegionId - 1]) == null) { - // alert('came inside for getting updated data'); - // white = $rootScope.whiteImageDataList[bodyRegionId - 1]; - - // } - // else - // { + white = $rootScope.whiteImageDataList[bodyRegionId - 1] - // } + } - //else - //{ - // white = $rootScope.whiteImageDataList[bodyRegionId - 1]; - //} + var worker = new Worker('extract-wp.js'); @@ -1664,7 +1616,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //push workers in array to further used the refernece to delete the workers $scope.runningWorkers.push({ 'workerName': worker }) - // console.log('for bodyRegionId = ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) worker.postMessage({ 'termList': multiTermList, @@ -1679,7 +1630,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //} worker.onmessage = function (e) { - console.log('callback in extract for e.data.bodyRegionId: ' + e.data.bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); + // console.log('callback in extract for e.data.bodyRegionId: ' + e.data.bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); var updatedData = e.data.value; @@ -1728,8 +1679,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.HighlightBodyByTermList = function (TermList) { - console.log('HighlightBodyByTermList is called'); - $scope.highlightedBR = null; $scope.highlightedBR = []; @@ -1746,15 +1695,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var n = $rootScope.MaskCanvasData.length; - //console.log('$rootScope.MaskCanvasData.length= ' + n) - - // console.log('Start time taken for term: ' + TermList[i]._TermNumber + 'in posting: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); - //debugger + $timeout(function () { for (var x = 0; x < 9; x++) { - console.log('$rootScope.MaskCanvasData.length= ' + n) + // console.log('$rootScope.MaskCanvasData.length= ' + n) // debugger var bodyRegionId = $rootScope.MaskCanvasData[x].bodyRegionId; @@ -1825,7 +1771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo worker.onmessage = function (e) { - console.log('callback for e.data.bodyRegionId: ' + e.data.bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); + // console.log('callback for e.data.bodyRegionId: ' + e.data.bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); var updatedData = e.data.value; @@ -1858,7 +1804,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); - console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) if ($scope.highlightedBR.length == 9) { //debugger; @@ -2131,8 +2076,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.changeLayer = function () { - //console.log('changeLayer'); - // alert('slide') + } $('layerChangeSlider').slider().on('slideStop', function (ev) { @@ -4332,7 +4276,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.highLightBody = function () { - console.log('highLightBody is called'); + if ($rootScope.isHighLight == true) { @@ -4439,7 +4383,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.grayeddBR.length == 9) { if ($scope.isHighlightByListManager == true) { - console.log('$scope.grayeddBR.length is ' + $scope.grayeddBR.length); + // console.log('$scope.grayeddBR.length is ' + $scope.grayeddBR.length); $timeout(function () { // $rootScope.isHighLight = false; @@ -4464,7 +4408,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //and then highlight the previously selected body regions at the time of normal mode. if ($scope.grayeddBR.length == 9) { - console.log('normal,extract,highlight and this time the length: ' + $scope.grayeddBR.length); + // console.log('normal,extract,highlight and this time the length: ' + $scope.grayeddBR.length); if ($rootScope.previousHighlightList.length > 0) { var multiTermList = []; @@ -4718,8 +4662,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.$on('jsPanelCloseEvent', function (event, data) { - - console.log('terminate worker process') //terminate previous running workers to create space for new workers if ($scope.runningWorkers != null) { var workerCount = $scope.runningWorkers.length; @@ -4916,17 +4858,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .from($scope.NavigatorData.Navigtor.ViewOrientation) .where("_ViewOrientationId == " + $scope.voId) .select(); - //console.log(navdtlOrient); - //console.log(navdtlOrient[0].ImageInfo); + var navOrientationdata = new jinqJs() .from(navdtlOrient[0].ImageInfo) .where("_Ethnicity == " + $scope.skinTone) .select(); - //console.log(navOrientationdata); $scope.NavOrientationdata = navOrientationdata; - //console.log("$scope.NavOrientationdata: "); - //console.log($scope.NavOrientationdata); + var navimagemodesty; @@ -4946,9 +4885,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //Annotation tool event lsitener $scope.$on('annotationToolEvent', function (event, data) { - //console.log('annotation window opend'); - //draw new canvas on canavs div to draw/paint on that - //debugger; + if (document.getElementById('paintCanvas') == null) { var paintCanvas = document.createElement('canvas'); paintCanvas.id = 'paintCanvas'; @@ -5494,7 +5431,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.aligneCanvasWithTerm = function () { - console.log('aligneCanvasWithTerm') var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); @@ -5516,9 +5452,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - - console.log('newX =' + newX + ',newY= ' + newY) - $('#canvasDiv').scrollLeft(newX); + $('#canvasDiv').scrollLeft(newX); $('#canvasDiv').scrollTop(newY); diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index 24feea0..cb45944 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -1,288 +1,288 @@ - - - - - - - - - A.D.A.M. Interactive Anatomy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- -
- Loading -
-
- -
-
> - - - - - - - - - -