Commit e8722557222b8091db0d82cb05d9fb23ed0212b0

Authored by Amrita Vishnoi
2 parents ac0b5ad2 e9a0325e

Merge branch 'Bug#23948' of http://52.6.196.163/ADAM/AIAHTML5 into QA-IPad-MAC-Test

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -5429,28 +5429,47 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -5429,28 +5429,47 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
5429 var imageData = imageD.data; 5429 var imageData = imageD.data;
5430 var length = imageData.length; 5430 var length = imageData.length;
5431 5431
5432 - // set every fourth value to the desired number of transparency  
5433 5432
  5433 + //to resolve lateral arm black issue in highlight mode
  5434 + if ($scope.isHighLight) {
  5435 + // if ($scope.voId == "9" || $scope.voId == "11") {
  5436 +
  5437 + var c = 0;
  5438 + for (var i = 0; i < imageData.length; i += 4) {
  5439 + if (imageData[i] == imageData[i + 1] && imageData[i + 1] == imageData[i + 2] && imageData[i + 2] === 0) {
  5440 + imageData[i + 3] = 0;
  5441 + }
  5442 +
  5443 + }
  5444 + tempCtx.putImageData(imageD, 0, 0);
  5445 + //}
  5446 + }
  5447 + // set every fourth value to the desired number of transparency
  5448 + var imageD1 = tempCtx.getImageData(0, 0, Width, Height);
  5449 + var imageData1 = imageD1.data;
  5450 + var length = imageData.length;
5434 5451
5435 for (var i = 3; i < length; i += 4) { 5452 for (var i = 3; i < length; i += 4) {
5436 if ($scope.voId == "9" || $scope.voId == "11") { 5453 if ($scope.voId == "9" || $scope.voId == "11") {
5437 5454
5438 - if (imageData[i] == 0) { 5455 + if (imageData1[i] == 0) {
5439 5456
5440 } 5457 }
5441 else { 5458 else {
5442 - imageData[i] = ((255) * (parseInt(transNumber))) / 100; 5459 + imageData1[i] = ((255) * (parseInt(transNumber))) / 100;
5443 } 5460 }
5444 } 5461 }
5445 else { 5462 else {
5446 5463
5447 - imageData[i] = ((255) * (parseInt(transNumber))) / 100; 5464 + imageData1[i] = ((255) * (parseInt(transNumber))) / 100;
5448 } 5465 }
5449 5466
5450 5467
5451 } 5468 }
5452 5469
5453 - tempCtx.putImageData(imageD, 0, 0); 5470 +
  5471 +
  5472 + tempCtx.putImageData(imageD1, 0, 0);
5454 5473
5455 5474
5456 $scope.widthOfImage = WidthforTransImage; 5475 $scope.widthOfImage = WidthforTransImage;
@@ -5534,31 +5553,52 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5534,31 +5553,52 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5534 var modestyTemCanvas = $("canvas[id*='tempCanvasModesty_']"); 5553 var modestyTemCanvas = $("canvas[id*='tempCanvasModesty_']");
5535 if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { 5554 if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
5536 5555
  5556 + //for modesty
5537 for (var j = 0; j < modestyTransCanvases.length; j++) { 5557 for (var j = 0; j < modestyTransCanvases.length; j++) {
5538 - var ctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d');  
5539 - var imageDa = ctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); 5558 + var modctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d');
  5559 + var modimageDa = modctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height);
  5560 + //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]);
  5561 +
  5562 + var modimageData = modimageDa.data;
  5563 + var length = modimageData.length;
  5564 +
  5565 + if ($scope.isHighLight) {
  5566 + //if ($scope.voId == "9" || $scope.voId == "11") {
  5567 +
  5568 + var c = 0;
  5569 + for (var i = 0; i < modimageData.length; i += 4) {
  5570 + if (modimageData[i] == modimageData[i + 1] && modimageData[i + 1] == modimageData[i + 2] && modimageData[i + 2] === 0) {
  5571 + modimageData[i + 3] = 0;
  5572 + }
  5573 +
  5574 + }
  5575 + modctx.putImageData(modimageDa, 0, 0);
  5576 + // }
  5577 + }
  5578 + // set every fourth value to desired transparency
  5579 + var ctx1 = document.getElementById(modestyTransCanvases[j].id).getContext('2d');
  5580 + var imageDa1 = ctx1.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height);
5540 //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]); 5581 //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]);
5541 5582
5542 - var imageData = imageDa.data;  
5543 - var length = imageData.length;  
5544 - // set every fourth value to 50 5583 + var imageData1 = imageDa1.data;
  5584 + var length = imageData1.length;
5545 for (var i = 3; i < length; i += 4) { 5585 for (var i = 3; i < length; i += 4) {
5546 - //NIKITA 5586 +
5547 if ($scope.voId == "9" || $scope.voId == "11") { 5587 if ($scope.voId == "9" || $scope.voId == "11") {
5548 5588
5549 - if (imageData[i] == 0) { 5589 + if (imageData1[i] == 0) {
5550 5590
5551 } 5591 }
5552 else { 5592 else {
5553 - imageData[i] = ((255) * (parseInt(transNumber))) / 100; 5593 + imageData1[i] = ((255) * (parseInt(transNumber))) / 100;
5554 } 5594 }
5555 } 5595 }
5556 else { 5596 else {
5557 - if (imageData[i] == 0) { 5597 + if (imageData1[i] == 0) {
5558 5598
5559 } 5599 }
5560 else 5600 else
5561 - imageData[i] = ((255) * (parseInt(transNumber))) / 100; 5601 + imageData1[i] = ((255) * (parseInt(transNumber))) / 100;
5562 } 5602 }
5563 5603
5564 // imageData[i] = ((255) * (parseInt(transNumber))) / 100; 5604 // imageData[i] = ((255) * (parseInt(transNumber))) / 100;
@@ -5567,7 +5607,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5567,7 +5607,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5567 // imageDa.data = imageData; 5607 // imageDa.data = imageData;
5568 // and put the imagedata back to the canvas 5608 // and put the imagedata back to the canvas
5569 //ctx.putImageData(imageDa, XforTransImage, YforTransImage); 5609 //ctx.putImageData(imageDa, XforTransImage, YforTransImage);
5570 - ctx.putImageData(imageDa, 0, 0); 5610 + ctx1.putImageData(imageDa1, 0, 0);
5571 } 5611 }
5572 } 5612 }
5573 5613
@@ -5575,12 +5615,32 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5575,12 +5615,32 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5575 var ctx = document.getElementById('transparencyCanvas').getContext('2d'); 5615 var ctx = document.getElementById('transparencyCanvas').getContext('2d');
5576 5616
5577 // var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); 5617 // var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
  5618 + var imageDa1 = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight);
  5619 +
  5620 + // get the image data values
  5621 + var imageData1 = imageDa1.data;
  5622 + var length = imageData1.length;
  5623 +
  5624 + if ($scope.isHighLight) {
  5625 + if ($scope.voId == "9" || $scope.voId == "11") {
  5626 +
  5627 + var c = 0;
  5628 + for (var i = 0; i < imageData1.length; i += 4) {
  5629 + if (imageData1[i] == imageData1[i + 1] && imageData1[i + 1] == imageData1[i + 2] && imageData1[i + 2] === 0) {
  5630 + imageData1[i + 3] = 0;
  5631 + }
  5632 +
  5633 + }
  5634 + ctx.putImageData(imageDa1, 0, 0);
  5635 + }
  5636 + }
  5637 +
  5638 + // set every fourth value to selected transparency
5578 var imageDa = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight); 5639 var imageDa = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight);
5579 5640
5580 // get the image data values 5641 // get the image data values
5581 var imageData = imageDa.data; 5642 var imageData = imageDa.data;
5582 var length = imageData.length; 5643 var length = imageData.length;
5583 - // set every fourth value to 50  
5584 for (var i = 3; i < length; i += 4) { 5644 for (var i = 3; i < length; i += 4) {
5585 //NIKITA 5645 //NIKITA
5586 if ($scope.voId == "9" || $scope.voId == "11") { 5646 if ($scope.voId == "9" || $scope.voId == "11") {