Commit 9044b961d0a5ca82869b8b3cd853992cc96e6886
Merge branch 'Bug#23948' of http://52.6.196.163/ADAM/AIAHTML5 into Develop-IPAD-MAC
Showing
1 changed file
with
77 additions
and
17 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -5412,28 +5412,47 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -5412,28 +5412,47 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
5412 | var imageData = imageD.data; | 5412 | var imageData = imageD.data; |
5413 | var length = imageData.length; | 5413 | var length = imageData.length; |
5414 | 5414 | ||
5415 | - // set every fourth value to the desired number of transparency | ||
5416 | 5415 | ||
5416 | + //to resolve lateral arm black issue in highlight mode | ||
5417 | + if ($scope.isHighLight) { | ||
5418 | + // if ($scope.voId == "9" || $scope.voId == "11") { | ||
5419 | + | ||
5420 | + var c = 0; | ||
5421 | + for (var i = 0; i < imageData.length; i += 4) { | ||
5422 | + if (imageData[i] == imageData[i + 1] && imageData[i + 1] == imageData[i + 2] && imageData[i + 2] === 0) { | ||
5423 | + imageData[i + 3] = 0; | ||
5424 | + } | ||
5425 | + | ||
5426 | + } | ||
5427 | + tempCtx.putImageData(imageD, 0, 0); | ||
5428 | + //} | ||
5429 | + } | ||
5430 | + // set every fourth value to the desired number of transparency | ||
5431 | + var imageD1 = tempCtx.getImageData(0, 0, Width, Height); | ||
5432 | + var imageData1 = imageD1.data; | ||
5433 | + var length = imageData.length; | ||
5417 | 5434 | ||
5418 | for (var i = 3; i < length; i += 4) { | 5435 | for (var i = 3; i < length; i += 4) { |
5419 | if ($scope.voId == "9" || $scope.voId == "11") { | 5436 | if ($scope.voId == "9" || $scope.voId == "11") { |
5420 | 5437 | ||
5421 | - if (imageData[i] == 0) { | 5438 | + if (imageData1[i] == 0) { |
5422 | 5439 | ||
5423 | } | 5440 | } |
5424 | else { | 5441 | else { |
5425 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | 5442 | + imageData1[i] = ((255) * (parseInt(transNumber))) / 100; |
5426 | } | 5443 | } |
5427 | } | 5444 | } |
5428 | else { | 5445 | else { |
5429 | 5446 | ||
5430 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | 5447 | + imageData1[i] = ((255) * (parseInt(transNumber))) / 100; |
5431 | } | 5448 | } |
5432 | 5449 | ||
5433 | 5450 | ||
5434 | } | 5451 | } |
5435 | 5452 | ||
5436 | - tempCtx.putImageData(imageD, 0, 0); | 5453 | + |
5454 | + | ||
5455 | + tempCtx.putImageData(imageD1, 0, 0); | ||
5437 | 5456 | ||
5438 | 5457 | ||
5439 | $scope.widthOfImage = WidthforTransImage; | 5458 | $scope.widthOfImage = WidthforTransImage; |
@@ -5517,31 +5536,52 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -5517,31 +5536,52 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
5517 | var modestyTemCanvas = $("canvas[id*='tempCanvasModesty_']"); | 5536 | var modestyTemCanvas = $("canvas[id*='tempCanvasModesty_']"); |
5518 | if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { | 5537 | if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { |
5519 | 5538 | ||
5539 | + //for modesty | ||
5520 | for (var j = 0; j < modestyTransCanvases.length; j++) { | 5540 | for (var j = 0; j < modestyTransCanvases.length; j++) { |
5521 | - var ctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); | ||
5522 | - var imageDa = ctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | 5541 | + var modctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); |
5542 | + var modimageDa = modctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | ||
5543 | + //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]); | ||
5544 | + | ||
5545 | + var modimageData = modimageDa.data; | ||
5546 | + var length = modimageData.length; | ||
5547 | + | ||
5548 | + if ($scope.isHighLight) { | ||
5549 | + //if ($scope.voId == "9" || $scope.voId == "11") { | ||
5550 | + | ||
5551 | + var c = 0; | ||
5552 | + for (var i = 0; i < modimageData.length; i += 4) { | ||
5553 | + if (modimageData[i] == modimageData[i + 1] && modimageData[i + 1] == modimageData[i + 2] && modimageData[i + 2] === 0) { | ||
5554 | + modimageData[i + 3] = 0; | ||
5555 | + } | ||
5556 | + | ||
5557 | + } | ||
5558 | + modctx.putImageData(modimageDa, 0, 0); | ||
5559 | + // } | ||
5560 | + } | ||
5561 | + // set every fourth value to desired transparency | ||
5562 | + var ctx1 = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); | ||
5563 | + var imageDa1 = ctx1.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | ||
5523 | //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]); | 5564 | //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]); |
5524 | 5565 | ||
5525 | - var imageData = imageDa.data; | ||
5526 | - var length = imageData.length; | ||
5527 | - // set every fourth value to 50 | 5566 | + var imageData1 = imageDa1.data; |
5567 | + var length = imageData1.length; | ||
5528 | for (var i = 3; i < length; i += 4) { | 5568 | for (var i = 3; i < length; i += 4) { |
5529 | - //NIKITA | 5569 | + |
5530 | if ($scope.voId == "9" || $scope.voId == "11") { | 5570 | if ($scope.voId == "9" || $scope.voId == "11") { |
5531 | 5571 | ||
5532 | - if (imageData[i] == 0) { | 5572 | + if (imageData1[i] == 0) { |
5533 | 5573 | ||
5534 | } | 5574 | } |
5535 | else { | 5575 | else { |
5536 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | 5576 | + imageData1[i] = ((255) * (parseInt(transNumber))) / 100; |
5537 | } | 5577 | } |
5538 | } | 5578 | } |
5539 | else { | 5579 | else { |
5540 | - if (imageData[i] == 0) { | 5580 | + if (imageData1[i] == 0) { |
5541 | 5581 | ||
5542 | } | 5582 | } |
5543 | else | 5583 | else |
5544 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | 5584 | + imageData1[i] = ((255) * (parseInt(transNumber))) / 100; |
5545 | } | 5585 | } |
5546 | 5586 | ||
5547 | // imageData[i] = ((255) * (parseInt(transNumber))) / 100; | 5587 | // imageData[i] = ((255) * (parseInt(transNumber))) / 100; |
@@ -5550,7 +5590,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -5550,7 +5590,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
5550 | // imageDa.data = imageData; | 5590 | // imageDa.data = imageData; |
5551 | // and put the imagedata back to the canvas | 5591 | // and put the imagedata back to the canvas |
5552 | //ctx.putImageData(imageDa, XforTransImage, YforTransImage); | 5592 | //ctx.putImageData(imageDa, XforTransImage, YforTransImage); |
5553 | - ctx.putImageData(imageDa, 0, 0); | 5593 | + ctx1.putImageData(imageDa1, 0, 0); |
5554 | } | 5594 | } |
5555 | } | 5595 | } |
5556 | 5596 | ||
@@ -5558,12 +5598,32 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -5558,12 +5598,32 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
5558 | var ctx = document.getElementById('transparencyCanvas').getContext('2d'); | 5598 | var ctx = document.getElementById('transparencyCanvas').getContext('2d'); |
5559 | 5599 | ||
5560 | // var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); | 5600 | // var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); |
5601 | + var imageDa1 = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight); | ||
5602 | + | ||
5603 | + // get the image data values | ||
5604 | + var imageData1 = imageDa1.data; | ||
5605 | + var length = imageData1.length; | ||
5606 | + | ||
5607 | + if ($scope.isHighLight) { | ||
5608 | + if ($scope.voId == "9" || $scope.voId == "11") { | ||
5609 | + | ||
5610 | + var c = 0; | ||
5611 | + for (var i = 0; i < imageData1.length; i += 4) { | ||
5612 | + if (imageData1[i] == imageData1[i + 1] && imageData1[i + 1] == imageData1[i + 2] && imageData1[i + 2] === 0) { | ||
5613 | + imageData1[i + 3] = 0; | ||
5614 | + } | ||
5615 | + | ||
5616 | + } | ||
5617 | + ctx.putImageData(imageDa1, 0, 0); | ||
5618 | + } | ||
5619 | + } | ||
5620 | + | ||
5621 | + // set every fourth value to selected transparency | ||
5561 | var imageDa = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight); | 5622 | var imageDa = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight); |
5562 | 5623 | ||
5563 | // get the image data values | 5624 | // get the image data values |
5564 | var imageData = imageDa.data; | 5625 | var imageData = imageDa.data; |
5565 | var length = imageData.length; | 5626 | var length = imageData.length; |
5566 | - // set every fourth value to 50 | ||
5567 | for (var i = 3; i < length; i += 4) { | 5627 | for (var i = 3; i < length; i += 4) { |
5568 | //NIKITA | 5628 | //NIKITA |
5569 | if ($scope.voId == "9" || $scope.voId == "11") { | 5629 | if ($scope.voId == "9" || $scope.voId == "11") { |