diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index debe3bd..62d1ac1 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -525,7 +525,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.loadSearchDataForBodyView = function () { - + console.log('loadSearchDataForBodyView'); var currentBodyViewId = localStorage.getItem("currentBodyViewId"); @@ -724,6 +724,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.CanvasDrawingListner(); + // $rootScope.FreeStylePaint(); + + } + $scope.terminateCurrentlyRunningWPs(); var drawnBodyRegionCount = []; @@ -1197,11 +1206,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 { @@ -1222,6 +1233,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; @@ -1430,8 +1442,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo context.scale(-1, 1); context.drawImage(img, 0, 0); context.restore(); - - + + if (isMaskImage == 'N') { @@ -1501,9 +1513,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo ); } }; - + + if (document.getElementById('canvasDiv') != null) document.getElementById('canvasDiv').appendChild(FlipedImgCanvas); + + @@ -1755,9 +1770,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo function start() { - //debugger; + context.drawImage(img, 0, 0); + + if (isMaskImage == 'N') { if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { //do nothing @@ -1985,7 +2002,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; @@ -2021,7 +2038,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 @@ -2223,7 +2240,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; @@ -2243,7 +2260,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - //debugger; + if (canvasId.match('_MR')) { $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; @@ -2275,7 +2292,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } if ($scope.doAligneCanvasWithTerm == true) { - //debugger; + if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) $rootScope.isLoading = false; @@ -2306,9 +2323,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); @@ -2369,8 +2383,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 @@ -2405,8 +2418,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) { @@ -2453,11 +2465,9 @@ 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 @@ -2481,7 +2491,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'); @@ -2560,6 +2570,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) + if ($rootScope.isHighlightBodyByBodySystem) { $timeout(function () { $scope.DisableProgressBar() }, 20000); } @@ -5790,7 +5801,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.OnViewChange = function (event) { - + $("#btnExtract").removeClass("disabled"); $("#btnTranparency").removeClass("disabled"); $rootScope.isTransparencyBoxActivated = false; @@ -5981,7 +5992,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { - + //$rootScope.voId = currentBodyViewId; //$scope.skinTone = $rootScope.globalSetting.ethnicity; @@ -6039,7 +6050,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $("#canvas").css("display", "block"); $("#canvasPaint").css("display", "block"); - $scope.doClick(); + $scope.CanvasDrawingListner(); $rootScope.FreeStylePaint(); }); $scope.mousePs; @@ -6055,7 +6066,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.offsetY1 = 0; $scope.x = 0; $scope.y = 0; - $scope.doClick = function (event) { + $scope.CanvasDrawingListner = function (event) { $scope.clicked = true; // OnPaintCanvasMouseDown(event); @@ -6100,6 +6111,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.resetText = 0; $rootScope.resetTextSave = 0; $rootScope.ObjectIndexSave = 0; + var arrayRect = {}; @@ -6147,7 +6159,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo break; case "Line": - + $rootScope.resetLine = $rootScope.ObjectIndex++; $('#canvas').addLayer({ name: 'Line_' + $rootScope.resetLine, @@ -6159,7 +6171,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo rounded: true, x1: $scope.offsetX1, y1: $scope.offsetY1, x2: $scope.x, y2: $scope.y, - + click: function (layer) { $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); @@ -6308,7 +6320,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo click: function (layer) { - // alert(layer.name); + $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); $('#canvas').setLayer(layer.name, { @@ -6636,6 +6648,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } + + //-- TextArea functionality of Annotation toolbar $rootScope.fontSizes; @@ -6990,7 +7004,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $(document).keydown(function (event) { - + // predefined function for detecting keyboard key if (event.which == 46) { if ($rootScope.shapeTypePin == "Pin") { @@ -7510,7 +7524,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var termsTotal = '' + $scope.VocabTermTxt.length + ' Structures'; $("#totalTerms").empty(); $('#totalTerms').append(termsTotal); - + } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index d6de654..482a4fe 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -89,15 +89,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } } - $rootScope.DrawLine = function () { + // $rootScope.DrawLine = function () { //$rootScope.isIdetifyClicked = false; //$rootScope.isDrawingToolSelected = true; //$rootScope.isLineDrawSelecyed = true; - $rootScope.shapeType = "Line"; + // $rootScope.shapeType = "Line"; // alert($rootScope.shapeType); - } + // } $rootScope.ClearIframe = function () { if ($('#daImagePanel') != null) @@ -159,20 +159,26 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", //----Annotation Toolbar: Jcanvas----- - $rootScope.DrawLine = function (e) { + $rootScope.DrLine = function (e) { + + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); + $rootScope.switchCanvas(); $rootScope.shapeType = "Line"; - - + $('.btnCursor').removeClass('activebtncolor'); - $(".btn-annotation").removeClass("activebtncolor"); - $(".btn-annotation-line").addClass("activebtncolor"); - + $(".btn-annotation").removeClass("activebtncolor"); + $(".btn-annotation-line").addClass("activebtncolor"); } - $rootScope.DrawPin = function (e) { + $rootScope.DrPin = function (e) { + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); + + $rootScope.switchCanvas(); $rootScope.switchCanvas(); $rootScope.shapeType = "Pin"; @@ -191,6 +197,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.DrawRectangle = function (e) { + $("#canvasPaint").css("display", "block"); $("#canvas").css("display", "block"); $rootScope.switchCanvas(); 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 24170a2..5524308 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -309,7 +309,7 @@
- +
diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index b02ef0a..3531f7f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -431,12 +431,12 @@
- +
- +