Commit 601b0c172c2eedb7d37c6e8e81f50b8512c45af2

Authored by Nikita Kulshreshtha
1 parent 7a445d63

highlight was not working on fig leaf region- fixed now

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -1179,6 +1179,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1179 1179  
1180 1180 var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
1181 1181  
  1182 +
  1183 + //Modesty ON
  1184 + if (maskCanvasId.match('modestyImg') && RGBColor != '000000') {
  1185 + RGBColor = DA[0].figLeafTermId;
  1186 + annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor);
  1187 + }
  1188 + //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to
  1189 + //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er
  1190 + //
  1191 + else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') {
  1192 + //if ($scope.voId == 11) {
  1193 + // maskCanvasId = 'imageCanvas6_mci';
  1194 + // x = $('#imageCanvas6_mci').left;
  1195 + // y = $('#imageCanvas6_mci').top;
  1196 + //}
  1197 + //else {
  1198 + bodyRegionId = maskCanvasId.slice(-1);
  1199 + maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci';
  1200 + // }
  1201 + var maskCanvas = document.getElementById(maskCanvasId);
  1202 + var maskCanvasContext = maskCanvas.getContext("2d");
  1203 + RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
  1204 + annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
  1205 + }
  1206 + else {
  1207 + RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
  1208 + annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
  1209 +
  1210 + }
  1211 +
  1212 +
  1213 +
1182 1214 if ($rootScope.isHighLight) {
1183 1215  
1184 1216 if ($scope.machedIcolorInBodyRegion.length > 0) {
... ... @@ -1222,7 +1254,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1222 1254  
1223 1255 $scope.previousSelectedTermList.push(previousIcolor);
1224 1256  
1225   - $scope.highLightBodyBasedOnIcolor(RGBColor);
  1257 + if (maskCanvasId.match('modestyImg') && RGBColor != '000000'){}
  1258 + else
  1259 + $scope.highLightBodyBasedOnIcolor(RGBColor);
1226 1260  
1227 1261 //var ActualTermNo = $scope.getActualTermNumber(RGBColor);
1228 1262 ////3. Find Term No List Based on ActualTermNo
... ... @@ -1267,35 +1301,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1267 1301  
1268 1302  
1269 1303  
1270   - //Modesty ON
1271   - if (maskCanvasId.match('modestyImg') && RGBColor != '000000') {
1272   - RGBColor = DA[0].figLeafTermId;
1273   - annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor);
1274   - }
1275   - //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to
1276   - //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er
1277   - //
1278   - else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') {
1279   - //if ($scope.voId == 11) {
1280   - // maskCanvasId = 'imageCanvas6_mci';
1281   - // x = $('#imageCanvas6_mci').left;
1282   - // y = $('#imageCanvas6_mci').top;
1283   - //}
1284   - //else {
1285   - bodyRegionId = maskCanvasId.slice(-1);
1286   - maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci';
1287   - // }
1288   - var maskCanvas = document.getElementById(maskCanvasId);
1289   - var maskCanvasContext = maskCanvas.getContext("2d");
1290   - RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
1291   - annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
1292   - }
1293   - else {
1294   - RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
1295   - annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
1296   -
1297   - }
1298   -
  1304 +
1299 1305  
1300 1306 if ($('#speechBubbleTrns').length > 0)
1301 1307 $('#speechBubbleTrns').remove();
... ...