Commit e242e5ff38139d733719c69fea234253ceb64bb0
1 parent
ac165cb0
there was an issue, after clsoing transaprency box, annotations was not working …
…on that bodyregion.- fixed now
Showing
1 changed file
with
55 additions
and
11 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1781,7 +1781,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1781 | 1781 | transparencyTempCanvas.style.position = "absolute"; |
1782 | 1782 | transparencyTempCanvas.style.left = X + 'px' // x + "px"; |
1783 | 1783 | transparencyTempCanvas.style.top = Y + "px"//y + "px"; |
1784 | - transparencyTempCanvas.style.visibility = 'hidden'; | |
1784 | + transparencyTempCanvas.style.visibility = 'hidden'; | |
1785 | 1785 | //transparencyTempCanvas.style.visibility = 'visible'; |
1786 | 1786 | // transparencyCanvas.style.zIndex = 4000; |
1787 | 1787 | document.getElementById('canvasDiv').appendChild(transparencyTempCanvas); |
... | ... | @@ -1875,15 +1875,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1875 | 1875 | var imageData = imageD.data; |
1876 | 1876 | var length = imageData.length; |
1877 | 1877 | |
1878 | - // set every fourth value to 50 | |
1879 | - for (var i = 3; i < length; i += 4) { | |
1880 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | |
1878 | + //change background of image from transparent to white | |
1879 | + if ($scope.voId == 9 || $scope.voId == 11) { | |
1880 | + for (var i = 3; i < length; i += 4) { | |
1881 | + imageData[i] = '#FFFFFFFF'; | |
1882 | + } | |
1883 | + | |
1884 | + tempCtx.putImageData(imageD, 0, 0); | |
1885 | + | |
1886 | + var imageDWhite = tempCtx.getImageData(0, 0, Width, Height); | |
1887 | + var imageDataWhite = imageDWhite.data; | |
1888 | + var lengthW = imageDataWhite.length; | |
1889 | + // | |
1890 | + for (var i = 3; i < lengthW; i += 4) { | |
1891 | + imageDataWhite[i] = ((255) * (parseInt(transNumber))) / 100; | |
1892 | + } | |
1893 | + | |
1894 | + // imageD.data = imageData; | |
1895 | + // and put the imagedata back to the canvas | |
1896 | + // debugger | |
1897 | + tempCtx.putImageData(imageDWhite, 0, 0); | |
1881 | 1898 | } |
1899 | + else { | |
1900 | + | |
1882 | 1901 | |
1883 | - // imageD.data = imageData; | |
1884 | - // and put the imagedata back to the canvas | |
1885 | - // debugger | |
1886 | - tempCtx.putImageData(imageD, 0, 0); | |
1902 | + // set every fourth value to 50 | |
1903 | + for (var i = 3; i < length; i += 4) { | |
1904 | + imageData[i] = ((255) * (parseInt(transNumber))) / 100; | |
1905 | + } | |
1906 | + | |
1907 | + // imageD.data = imageData; | |
1908 | + // and put the imagedata back to the canvas | |
1909 | + // debugger | |
1910 | + tempCtx.putImageData(imageD, 0, 0); | |
1911 | + } | |
1912 | + | |
1887 | 1913 | |
1888 | 1914 | } |
1889 | 1915 | |
... | ... | @@ -2408,8 +2434,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2408 | 2434 | $scope.layerNumber = 0; |
2409 | 2435 | $scope.isTransparencyActivated = false; |
2410 | 2436 | //}) |
2437 | + | |
2438 | + debugger; | |
2439 | + var tempCanvases = $("canvas[id*='transparencyTempCanvas']"); | |
2440 | + for (var i = 0; i < tempCanvases.length; i++) { | |
2441 | + tempCanvases[i].remove(); | |
2442 | + } | |
2443 | + | |
2444 | + $('.ui-wrapper').remove(); | |
2445 | + | |
2446 | + //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']")) | |
2447 | + //.remove(); | |
2411 | 2448 | } |
2412 | - $('#transparencyScale').css('visibility', 'hidden') | |
2449 | + $('#transparencyScale').css('visibility', 'hidden'); | |
2450 | + | |
2413 | 2451 | $scope.isTransparencyActivated = false; |
2414 | 2452 | // document.getElementById('btnTranparency').className = 't-transparency' |
2415 | 2453 | $('#btnTranparency').removeClass('tButtonActive'); |
... | ... | @@ -2489,12 +2527,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2489 | 2527 | $scope.OnGenderChange = function (event) { |
2490 | 2528 | // debugger; |
2491 | 2529 | //use $scope.correspondingBodyViewIds for getting correspnding viewid |
2492 | - // alert('gender changed= ' + event.currentTarget.attributes[1].value) | |
2530 | + // alert('gender changed= ' + event.currentTarget.attributes[1].value) | |
2531 | + | |
2532 | + // $(".enableGender li").removeClass("active"); | |
2533 | + // $(event.currentTarget.attributes[2].value).parent().addClass("active"); | |
2534 | + | |
2535 | + | |
2536 | + | |
2493 | 2537 | if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) { |
2494 | 2538 | |
2495 | 2539 | localStorage.setItem("genderId", 'Male'); |
2496 | 2540 | |
2497 | - $scope.changeGender() | |
2541 | + $scope.changeGender(); | |
2498 | 2542 | |
2499 | 2543 | } |
2500 | 2544 | ... | ... |