Commit f2cb3afaa9e3f3bb48f65a230ea28984427ab599

Authored by Amrita Vishnoi
1 parent 8b31725c

blacking out issue is fixed for list manager and search.

also the alignment of scrollbar issue is fixed in list manager.
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -12,14 +12,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
12 12 $rootScope.BodyRegionCordinatesData;
13 13 $scope.isTransparencyActivated;
14 14 $rootScope.BodyLayerData;
15   - $scope.VocabTermData;
  15 + $rootScope.VocabTermData;
16 16  
17 17 $scope.VocabTermTxt;
18 18 $scope.CommonData
19   - $scope.TermNumberData;
  19 + $rootScope.TermNumberData;
20 20 $rootScope.BodySystemData
21 21 $scope.bodyViewId = 0;
22 22 $rootScope.bgartData;
  23 + $scope.drawnBodyRegions;
23 24 //view specific constants
24 25 $rootScope.voId;
25 26 $scope.layerNumber;
... ... @@ -441,8 +442,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
441 442  
442 443  
443 444  
444   - $scope.TermNumberData = e.data.TermNumberData,
445   - $scope.VocabTermData = e.data.VocabTermData,
  445 + $rootScope.TermNumberData = e.data.TermNumberData,
  446 + $rootScope.VocabTermData = e.data.VocabTermData,
446 447 $scope.vocabTermTxt = e.data.vocabTermTxt
447 448  
448 449  
... ... @@ -854,7 +855,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
854 855 }
855 856 }
856 857  
857   -
  858 + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) && ($scope.ColoredImageSRC.length == 9)) {
  859 + if ($rootScope.isListManagerSelected == true) {
  860 + $rootScope.isLoading = true;
  861 + $('#spinner').css('visibility', 'visible');
  862 + $timeout(function () {
  863 + console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
  864 + $rootScope.isHighLight = true;
  865 + $scope.highLightBody()
  866 + }, 500);
  867 + }
  868 + }
858 869 });
859 870 }
860 871  
... ... @@ -1546,7 +1557,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1546 1557 $scope.annotationTextArray.push(annotationText);
1547 1558  
1548 1559 console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.annotationTextArray.length);
1549   -
1550 1560 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
1551 1561 }
1552 1562  
... ... @@ -1814,7 +1824,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1814 1824  
1815 1825 var white;
1816 1826 if (canvasId.match('_MR')) {
1817   - if ($rootScope.coloredImageCanvasList[bodyRegionId] != null || $rootScope.coloredImageCanvasList[bodyRegionId] != undefined) {
  1827 + if ($rootScope.coloredImageMRCanvasList[bodyRegionId] != null || $rootScope.coloredImageMRCanvasList[bodyRegionId] != undefined) {
1818 1828 coloredImageDataVar = $rootScope.coloredImageMRCanvasList[bodyRegionId];
1819 1829 }
1820 1830  
... ... @@ -1881,6 +1891,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1881 1891 $scope.runningWorkers.push({ 'workerName': worker })
1882 1892  
1883 1893 // console.log('for bodyRegionId = ' + bodyRegionId+ ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"))
  1894 + console.log('before worker call BRID: ' + bodyRegionId)
1884 1895  
1885 1896 if (grayImageDataVar != null && coloredImageDataVar != null && maskData!=null) {
1886 1897 worker.postMessage({
... ... @@ -1899,7 +1910,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1899 1910  
1900 1911 worker.onmessage = function (e) {
1901 1912 console.log('callback for e.data.bodyRegionId: ' + e.data.bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"));
1902   -
  1913 +
1903 1914 var updatedData = e.data.value;
1904 1915  
1905 1916 var bodyRegionId = e.data.bodyRegionId;
... ... @@ -1910,12 +1921,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1910 1921  
1911 1922 //to do
1912 1923 var grayCanvas = document.getElementById(grayCanvasID);
1913   - var grayCanvasContext = grayCanvas.getContext("2d");
1914   -
  1924 + if (grayCanvas != null) {
  1925 + var grayCanvasContext = grayCanvas.getContext("2d");
1915 1926  
1916 1927  
1917   - grayCanvasContext.putImageData(updatedData, 0, 0);
1918 1928  
  1929 + grayCanvasContext.putImageData(updatedData, 0, 0);
  1930 + }
1919 1931  
1920 1932 //debugger;
1921 1933  
... ... @@ -1942,6 +1954,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1942 1954 $('#spinner').css('visibility', 'hidden');
1943 1955  
1944 1956 $scope.isHighlightBodysystem = false;
  1957 + debugger;
1945 1958 if ($rootScope.isListManagerSelected == true)
1946 1959 $scope.aligneCanvasWithTerm();
1947 1960 }
... ... @@ -2002,9 +2015,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2002 2015  
2003 2016 if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
2004 2017 $scope.TermNumber = termNumber;
2005   - if ($scope.TermNumberData != null || $scope.TermNumberData != undefined) {
  2018 + if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) {
2006 2019 $scope.matchedTermNoData = new jinqJs()
2007   - .from($scope.TermNumberData.TermData.Term)
  2020 + .from($rootScope.TermNumberData.TermData.Term)
2008 2021 .where('_TermNumber == ' + termNumber)
2009 2022 .select();
2010 2023  
... ... @@ -2034,9 +2047,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2034 2047  
2035 2048 var Annotation;
2036 2049 $scope.ActualTermNo = actualTermNo;
2037   - if ($scope.VocabTermData != null || $scope.VocabTermData != undefined) {
  2050 + if ($rootScope.VocabTermData != null || $rootScope.VocabTermData != undefined) {
2038 2051 $scope.matchedActualTermData = new jinqJs()
2039   - .from($scope.VocabTermData.VocabTerms.Term)
  2052 + .from($rootScope.VocabTermData.VocabTerms.Term)
2040 2053 .where('_ActualTermNumber == ' + actualTermNo)
2041 2054 .select();
2042 2055  
... ... @@ -4761,7 +4774,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4761 4774  
4762 4775 $scope.getActualTermNumber = function (iColor) {
4763 4776 $scope.actualTermNo = new jinqJs()
4764   - .from($scope.TermNumberData.TermData.Term)
  4777 + .from($rootScope.TermNumberData.TermData.Term)
4765 4778 .where('_TermNumber == ' + iColor)
4766 4779 .select('_ActualTermNumber');
4767 4780 if ($scope.actualTermNo != null || actualTermNo != undefined) {
... ... @@ -4777,7 +4790,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4777 4790 $scope.getTermNumberList = function (actualTermNo)
4778 4791 {
4779 4792 $scope.termList = new jinqJs()
4780   - .from($scope.TermNumberData.TermData.Term)
  4793 + .from($rootScope.TermNumberData.TermData.Term)
4781 4794 .where('_ActualTermNumber == ' + actualTermNo)
4782 4795 .select();
4783 4796 if ($scope.termList != null || $scope.termList != undefined) {
... ... @@ -4902,7 +4915,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4902 4915 DataService.getAnotherJson(termJsonPath)
4903 4916 .then(
4904 4917 function (result) {
4905   - $scope.TermNumberData = result;
  4918 + $rootScope.TermNumberData = result;
4906 4919  
4907 4920 var canDiv = document.getElementById('canvasDiv');
4908 4921 var canDivChildCount = canDiv.childElementCount;
... ... @@ -4913,7 +4926,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4913 4926 },
4914 4927 function (error) {
4915 4928 // handle errors here
4916   - console.log(' $scope.TermNumberData= ' + error.statusText);
  4929 + console.log(' $rootScope.TermNumberData= ' + error.statusText);
4917 4930 }
4918 4931 )
4919 4932 },
... ... @@ -5299,7 +5312,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5299 5312  
5300 5313 //list manager
5301 5314 $scope.$on('listManagerEvent', function (event, data) {
5302   - // debugger;
  5315 + // debugger;
  5316 + $('#spinner').css('visibility', 'visible');
5303 5317 console.log('listManagerEvent')
5304 5318 if ($rootScope.islistManagerEventAlredayDispachted == true) {
5305 5319  
... ... @@ -5334,24 +5348,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5334 5348 $rootScope.viewOrientationId = currentOpenViewId;
5335 5349 //confirm that this is DA module which is last open
5336 5350 if (currentOpenModuleId == 1) {
5337   - $http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
5338   - $scope.TermNumberData = data;
5339   - var actualtermList = new jinqJs()
5340   - .from($scope.TermNumberData.TermData.Term)
5341   - .select('_ActualTermNumber');
  5351 + //$http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
  5352 + // $rootScope.TermNumberData = data;
  5353 + // var actualtermList = new jinqJs()
  5354 + // .from($rootScope.TermNumberData.TermData.Term)
  5355 + // .select('_ActualTermNumber');
5342 5356  
5343   - var TermTextList = [];
5344   - var TermTextList = [];
  5357 + // var TermTextList = [];
  5358 + // var TermTextList = [];
5345 5359  
5346 5360 $scope.loadListManger();
5347 5361  
5348 5362  
5349   - })
5350   - .error(function (data, status, headers, config) {
  5363 + //})
  5364 + // .error(function (data, status, headers, config) {
5351 5365  
5352   - console.log(data);
  5366 + // console.log(data);
5353 5367  
5354   - });
  5368 + // });
5355 5369  
5356 5370  
5357 5371  
... ... @@ -5369,17 +5383,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5369 5383  
5370 5384  
5371 5385  
5372   - var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json'
  5386 + //var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json'
5373 5387  
5374   - $http({ method: 'GET', url: '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' }).success(function (data) {
  5388 + //$http({ method: 'GET', url: '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' }).success(function (data) {
5375 5389  
5376   - var VocabTermData = data;
  5390 + //var VocabTermData = data;
5377 5391  
5378 5392 var vocabTermTxt = [];
5379 5393  
5380   - angular.forEach($scope.TermNumberData.TermData.Term, function (value1, key1) {
  5394 + angular.forEach($rootScope.TermNumberData.TermData.Term, function (value1, key1) {
5381 5395  
5382   - angular.forEach(VocabTermData.VocabTerms.Term, function (value2, key2) {
  5396 + angular.forEach($rootScope.VocabTermData.VocabTerms.Term, function (value2, key2) {
5383 5397  
5384 5398  
5385 5399 if (value1._ActualTermNumber === value2._ActualTermNumber) {
... ... @@ -5403,7 +5417,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5403 5417  
5404 5418 })
5405 5419  
5406   -
  5420 +
5407 5421  
5408 5422 $scope.VocabTermTxt = new jinqJs()
5409 5423 .from(vocabTermTxt)
... ... @@ -5425,14 +5439,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5425 5439 $rootScope.isLoading = false;
5426 5440 $('#spinner').css('visibility', 'hidden');
5427 5441 }
5428   - })
  5442 + // })
5429 5443  
5430 5444  
5431   - .error(function (data, status, headers, config) {
  5445 + //.error(function (data, status, headers, config) {
5432 5446  
5433   - console.log(data);
  5447 + // console.log(data);
5434 5448  
5435   - });
  5449 + //});
5436 5450 }
5437 5451  
5438 5452  
... ... @@ -5496,7 +5510,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5496 5510  
5497 5511 //5.
5498 5512 $scope.matchdedDataOnLayer = new jinqJs()
5499   - .from($scope.TermNumberData.TermData.Term)
  5513 + .from($rootScope.TermNumberData.TermData.Term)
5500 5514 .where('_InternalLayerNumber == ' + internalLayerNumber)
5501 5515 .select();
5502 5516  
... ... @@ -5571,10 +5585,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5571 5585 $scope.isHighlightByListManager = true;
5572 5586  
5573 5587 //10.
5574   - $timeout(function () {
5575   - $rootScope.isHighLight = true;
5576   - $scope.highLightBody()
5577   - }, 500);
  5588 + //$timeout(function () {
  5589 + // $rootScope.isHighLight = true;
  5590 + // $scope.highLightBody()
  5591 + //}, 500);
5578 5592 //$timeout(function () {
5579 5593  
5580 5594 // // $rootScope.isHighLight = false;
... ... @@ -5735,7 +5749,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5735 5749 for (var i = 0; i < termList.length; i++) {
5736 5750  
5737 5751 var actulaTermNumber = new jinqJs()
5738   - .from($scope.TermNumberData.TermData.Term)
  5752 + .from($rootScope.TermNumberData.TermData.Term)
5739 5753 .where('_TermNumber == ' + termList[i]._TermNumber)
5740 5754 .select('_ActualTermNumber');
5741 5755  
... ...
400-SOURCECODE/AIAHTML5.Web/term-number-wp.js
... ... @@ -3,7 +3,7 @@ var doneBRID = [];
3 3 var abc = 'hello';
4 4 previousGrayImageDataList = [];
5 5 getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageData, grayImageData, bodyRegionId, canvasId) {
6   - console.log('for bodyRegionId: ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"))
  6 + console.log('for bodyRegionId in worker process: ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"))
7 7 console.log(grayImageData);
8 8 var matchedRGBLocationInBodyRegion = [];
9 9 var matched;
... ...