From 601b0c172c2eedb7d37c6e8e81f50b8512c45af2 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 12 Jul 2016 15:50:30 +0530 Subject: [PATCH] highlight was not working on fig leaf region- fixed now --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 66 ++++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index ebaa9e5..f1cd80f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1179,6 +1179,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); + + //Modesty ON + if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { + RGBColor = DA[0].figLeafTermId; + annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor); + } + //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to + //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er + // + else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') { + //if ($scope.voId == 11) { + // maskCanvasId = 'imageCanvas6_mci'; + // x = $('#imageCanvas6_mci').left; + // y = $('#imageCanvas6_mci').top; + //} + //else { + bodyRegionId = maskCanvasId.slice(-1); + maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci'; + // } + var maskCanvas = document.getElementById(maskCanvasId); + var maskCanvasContext = maskCanvas.getContext("2d"); + RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); + annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); + } + else { + RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); + annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); + + } + + + if ($rootScope.isHighLight) { if ($scope.machedIcolorInBodyRegion.length > 0) { @@ -1222,7 +1254,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.previousSelectedTermList.push(previousIcolor); - $scope.highLightBodyBasedOnIcolor(RGBColor); + if (maskCanvasId.match('modestyImg') && RGBColor != '000000'){} + else + $scope.highLightBodyBasedOnIcolor(RGBColor); //var ActualTermNo = $scope.getActualTermNumber(RGBColor); ////3. Find Term No List Based on ActualTermNo @@ -1267,35 +1301,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo - //Modesty ON - if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { - RGBColor = DA[0].figLeafTermId; - annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor); - } - //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to - //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er - // - else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') { - //if ($scope.voId == 11) { - // maskCanvasId = 'imageCanvas6_mci'; - // x = $('#imageCanvas6_mci').left; - // y = $('#imageCanvas6_mci').top; - //} - //else { - bodyRegionId = maskCanvasId.slice(-1); - maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci'; - // } - var maskCanvas = document.getElementById(maskCanvasId); - var maskCanvasContext = maskCanvas.getContext("2d"); - RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); - annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); - } - else { - RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); - annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); - - } - + if ($('#speechBubbleTrns').length > 0) $('#speechBubbleTrns').remove(); -- libgit2 0.21.4