Commit 3b6fce4d70f453e371174a2f9e4d8bca23798ce8
unwanted commit
Showing
3 changed files
with
612 additions
and
616 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -381,7 +381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
381 | 381 | if (openViews != null && openViews != undefined) { |
382 | 382 | angular.forEach(openViews, function (value, key) { |
383 | 383 | |
384 | - if (value.body-views == tittle) { | |
384 | + if (value.body - views == tittle) { | |
385 | 385 | tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; |
386 | 386 | $rootScope.currentActiveViewTitle = tittle; |
387 | 387 | localStorage.setItem("currentViewTitle", tittle); |
... | ... | @@ -811,7 +811,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
811 | 811 | if (localStorage.getItem("genderId") == 'Female') { |
812 | 812 | gender = 'F'; |
813 | 813 | |
814 | - } | |
814 | + } | |
815 | 815 | else { |
816 | 816 | gender = 'M'; |
817 | 817 | } |
... | ... | @@ -984,8 +984,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
984 | 984 | return mciImage; |
985 | 985 | |
986 | 986 | } |
987 | - else | |
988 | - { | |
987 | + else { | |
989 | 988 | console.log('IMAGE.SOURCE.NOLT.FOUND'); |
990 | 989 | } |
991 | 990 | } |
... | ... | @@ -1389,11 +1388,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1389 | 1388 | $rootScope.isLoading = true; |
1390 | 1389 | $('#spinner').css('visibility', 'visible'); |
1391 | 1390 | //$timeout(function () { |
1392 | - console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1393 | - $rootScope.isHighLight = true; | |
1394 | - console.log('just before highLightBody call'); | |
1395 | - $scope.highLightBody(); | |
1396 | - console.log('just after highLightBody call'); | |
1391 | + console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1392 | + $rootScope.isHighLight = true; | |
1393 | + console.log('just before highLightBody call'); | |
1394 | + $scope.highLightBody(); | |
1395 | + console.log('just after highLightBody call'); | |
1397 | 1396 | //}, 500); |
1398 | 1397 | } |
1399 | 1398 | } |
... | ... | @@ -1615,35 +1614,35 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1615 | 1614 | |
1616 | 1615 | console.log('1. annotationText: ' + annotationText); |
1617 | 1616 | |
1618 | - if ($('#dot').length > 0) { | |
1619 | - $('#dot').remove(); | |
1617 | + if ($('#dot').length > 0) { | |
1618 | + $('#dot').remove(); | |
1620 | 1619 | |
1621 | - if ($('#sppeachBubble').length > 0) { | |
1622 | - $('#sppeachBubble').remove(); | |
1623 | - } | |
1620 | + if ($('#sppeachBubble').length > 0) { | |
1621 | + $('#sppeachBubble').remove(); | |
1622 | + } | |
1624 | 1623 | |
1625 | 1624 | |
1626 | 1625 | |
1627 | - // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); | |
1626 | + // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); | |
1628 | 1627 | |
1629 | 1628 | |
1630 | - $scope.MultiLanguageAnnationArray.push(annotationText); | |
1629 | + $scope.MultiLanguageAnnationArray.push(annotationText); | |
1631 | 1630 | |
1632 | - console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1631 | + console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1633 | 1632 | |
1634 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1633 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1635 | 1634 | |
1636 | - } | |
1637 | - else { | |
1635 | + } | |
1636 | + else { | |
1638 | 1637 | |
1639 | 1638 | |
1640 | 1639 | |
1641 | - $scope.MultiLanguageAnnationArray = []; | |
1642 | - $scope.MultiLanguageAnnationArray.push(annotationText); | |
1640 | + $scope.MultiLanguageAnnationArray = []; | |
1641 | + $scope.MultiLanguageAnnationArray.push(annotationText); | |
1643 | 1642 | |
1644 | - console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1645 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1646 | - } | |
1643 | + console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1644 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1645 | + } | |
1647 | 1646 | |
1648 | 1647 | |
1649 | 1648 | } |
... | ... | @@ -1709,11 +1708,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1709 | 1708 | $rootScope.isLoading = true; |
1710 | 1709 | $('#spinner').css('visibility', 'visible'); |
1711 | 1710 | //$timeout(function () { |
1712 | - console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1713 | - $rootScope.isHighLight = true; | |
1714 | - console.log('just before highLightBody call'); | |
1715 | - $scope.highLightBody(); | |
1716 | - console.log('just after highLightBody call'); | |
1711 | + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1712 | + $rootScope.isHighLight = true; | |
1713 | + console.log('just before highLightBody call'); | |
1714 | + $scope.highLightBody(); | |
1715 | + console.log('just after highLightBody call'); | |
1717 | 1716 | //}, 500); |
1718 | 1717 | } |
1719 | 1718 | } |
... | ... | @@ -1723,7 +1722,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1723 | 1722 | } |
1724 | 1723 | } |
1725 | 1724 | |
1726 | - if (imgCanvas.id.match('_mci')) { | |
1725 | + if (imgCanvas.id.match('_mci')) { | |
1727 | 1726 | var maskImgData = context.getImageData(0, 0, w, h); |
1728 | 1727 | $rootScope.MaskCanvasData.push( |
1729 | 1728 | { |
... | ... | @@ -1856,7 +1855,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1856 | 1855 | //push workers in array to further used the refernece to delete the workers |
1857 | 1856 | $scope.runningWorkers.push({ 'workerName': worker }) |
1858 | 1857 | |
1859 | - console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white) | |
1858 | + console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white) | |
1860 | 1859 | |
1861 | 1860 | if (coloredImageDataVar != null && maskData != null && white != null) { |
1862 | 1861 | worker.postMessage({ |
... | ... | @@ -1896,26 +1895,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1896 | 1895 | grayCanvasContext.putImageData(updatedData, 0, 0); |
1897 | 1896 | |
1898 | 1897 | |
1899 | - //to resolve lateral arm black issue in highlight mode | |
1898 | + //to resolve lateral arm black issue in highlight mode | |
1900 | 1899 | |
1901 | - if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { | |
1900 | + if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { | |
1902 | 1901 | |
1903 | - var canavsWidth = parseInt(grayCanvas.width) ; | |
1904 | - var canavsHeight = parseInt(grayCanvas.height); | |
1902 | + var canavsWidth = parseInt(grayCanvas.width); | |
1903 | + var canavsHeight = parseInt(grayCanvas.height); | |
1905 | 1904 | |
1906 | - console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) | |
1905 | + console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) | |
1907 | 1906 | |
1908 | - var imgData = grayCanvasContext.getImageData(0, 0, canavsWidth, canavsHeight); | |
1909 | - var data = imgData.data; | |
1910 | - var c = 0; | |
1911 | - for (var i = 0; i < data.length; i += 4) { | |
1912 | - if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
1913 | - data[i + 3] = 0; | |
1914 | - } | |
1907 | + var imgData = grayCanvasContext.getImageData(0, 0, canavsWidth, canavsHeight); | |
1908 | + var data = imgData.data; | |
1909 | + var c = 0; | |
1910 | + for (var i = 0; i < data.length; i += 4) { | |
1911 | + if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
1912 | + data[i + 3] = 0; | |
1913 | + } | |
1915 | 1914 | |
1915 | + } | |
1916 | + grayCanvasContext.putImageData(imgData, 0, 0); | |
1916 | 1917 | } |
1917 | - grayCanvasContext.putImageData(imgData, 0, 0); | |
1918 | - } | |
1919 | 1918 | |
1920 | 1919 | |
1921 | 1920 | if ($rootScope.multiAnnotationIsON == true) { |
... | ... | @@ -1978,8 +1977,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1978 | 1977 | |
1979 | 1978 | |
1980 | 1979 | |
1981 | - $timeout(function () | |
1982 | - { | |
1980 | + $timeout(function () { | |
1983 | 1981 | var loopLength = 0; |
1984 | 1982 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
1985 | 1983 | loopLength = 9; |
... | ... | @@ -2019,22 +2017,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2019 | 2017 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
2020 | 2018 | } |
2021 | 2019 | } |
2022 | - else | |
2023 | - | |
2024 | - { | |
2025 | - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2020 | + else { | |
2021 | + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2026 | 2022 | |
2027 | - if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | |
2028 | - grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
2023 | + if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | |
2024 | + grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
2025 | + } | |
2029 | 2026 | } |
2030 | - } | |
2031 | - else { | |
2032 | - if ($rootScope.updatedGrayMRDataList[bodyRegionId] != null || $rootScope.updatedGrayMRDataList[bodyRegionId] != undefined) { | |
2033 | - grayImageDataVar = $rootScope.updatedGrayMRDataList[bodyRegionId] | |
2027 | + else { | |
2028 | + if ($rootScope.updatedGrayMRDataList[bodyRegionId] != null || $rootScope.updatedGrayMRDataList[bodyRegionId] != undefined) { | |
2029 | + grayImageDataVar = $rootScope.updatedGrayMRDataList[bodyRegionId] | |
2030 | + } | |
2034 | 2031 | } |
2035 | 2032 | } |
2036 | 2033 | } |
2037 | - } | |
2038 | 2034 | else { |
2039 | 2035 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
2040 | 2036 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
... | ... | @@ -2077,7 +2073,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2077 | 2073 | grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; |
2078 | 2074 | } |
2079 | 2075 | } |
2080 | - } | |
2076 | + } | |
2081 | 2077 | } |
2082 | 2078 | else |
2083 | 2079 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
... | ... | @@ -2330,7 +2326,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2330 | 2326 | |
2331 | 2327 | //remove annotation |
2332 | 2328 | |
2333 | - | |
2329 | + | |
2334 | 2330 | |
2335 | 2331 | |
2336 | 2332 | $scope.isLayerChange = true; |
... | ... | @@ -2461,7 +2457,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2461 | 2457 | $('#btnHighLight').addClass('btn-primary'); |
2462 | 2458 | |
2463 | 2459 | console.log('highLightBody call from DisableProgressBar') |
2464 | - // $scope.highLightBody(); | |
2460 | + // $scope.highLightBody(); | |
2465 | 2461 | |
2466 | 2462 | |
2467 | 2463 | |
... | ... | @@ -2588,67 +2584,67 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2588 | 2584 | else { |
2589 | 2585 | console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) |
2590 | 2586 | } |
2591 | - if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){ | |
2592 | - if ($scope.longestAnnotation.length <= 10) { | |
2587 | + if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { | |
2588 | + if ($scope.longestAnnotation.length <= 10) { | |
2593 | 2589 | |
2594 | 2590 | |
2595 | - $("#sppeachBubble").css("width", "100px"); | |
2591 | + $("#sppeachBubble").css("width", "100px"); | |
2596 | 2592 | |
2597 | - } | |
2593 | + } | |
2598 | 2594 | |
2599 | - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { | |
2595 | + else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { | |
2600 | 2596 | |
2601 | 2597 | |
2602 | 2598 | |
2603 | - $("#sppeachBubble").css("width", "140px"); | |
2599 | + $("#sppeachBubble").css("width", "140px"); | |
2604 | 2600 | |
2605 | - } | |
2606 | - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { | |
2601 | + } | |
2602 | + else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { | |
2607 | 2603 | |
2608 | 2604 | |
2609 | - $("#sppeachBubble").css("width", "195px"); | |
2605 | + $("#sppeachBubble").css("width", "195px"); | |
2610 | 2606 | |
2611 | - } | |
2612 | - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { | |
2607 | + } | |
2608 | + else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { | |
2613 | 2609 | |
2614 | - $("#sppeachBubble").css("width", "248px"); | |
2610 | + $("#sppeachBubble").css("width", "248px"); | |
2615 | 2611 | |
2616 | - } | |
2617 | - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { | |
2612 | + } | |
2613 | + else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { | |
2618 | 2614 | |
2619 | 2615 | |
2620 | - $("#sppeachBubble").css("width", "300px"); | |
2621 | - } | |
2616 | + $("#sppeachBubble").css("width", "300px"); | |
2617 | + } | |
2622 | 2618 | |
2623 | - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { | |
2619 | + else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { | |
2624 | 2620 | |
2625 | - $("#sppeachBubble").css("width", "370px"); | |
2621 | + $("#sppeachBubble").css("width", "370px"); | |
2626 | 2622 | |
2627 | - } | |
2623 | + } | |
2628 | 2624 | |
2629 | - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { | |
2625 | + else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { | |
2630 | 2626 | |
2631 | 2627 | |
2632 | - $("#sppeachBubble").css("width", "450px"); | |
2628 | + $("#sppeachBubble").css("width", "450px"); | |
2633 | 2629 | |
2634 | - } | |
2630 | + } | |
2635 | 2631 | |
2636 | - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { | |
2632 | + else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { | |
2637 | 2633 | |
2638 | 2634 | |
2639 | - $("#sppeachBubble").css("width", "510px"); | |
2635 | + $("#sppeachBubble").css("width", "510px"); | |
2640 | 2636 | |
2641 | - } | |
2637 | + } | |
2642 | 2638 | |
2643 | - else { | |
2639 | + else { | |
2644 | 2640 | |
2645 | 2641 | |
2646 | - $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); | |
2642 | + $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); | |
2647 | 2643 | |
2648 | 2644 | |
2649 | - } | |
2645 | + } | |
2650 | 2646 | |
2651 | - } | |
2647 | + } | |
2652 | 2648 | var Globe = []; |
2653 | 2649 | Globe.push({ currentX: x, currentY: y }); |
2654 | 2650 | |
... | ... | @@ -3782,7 +3778,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3782 | 3778 | } |
3783 | 3779 | |
3784 | 3780 | |
3785 | - //check if transparency is activated | |
3781 | + //check if transparency is activated | |
3786 | 3782 | |
3787 | 3783 | |
3788 | 3784 | var transNumber = $scope.transNumber;//txtTransparencyChange.value; |
... | ... | @@ -3791,46 +3787,46 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3791 | 3787 | |
3792 | 3788 | var imageD = tempCtx.getImageData(0, 0, Width, Height); |
3793 | 3789 | |
3794 | - | |
3795 | - var tempCtx = document.getElementById(tempCanvasID).getContext('2d'); | |
3796 | 3790 | |
3797 | - //keep the original image on temp canavs to use it in changing transparency | |
3798 | - | |
3799 | - if (document.getElementById('tempCanvas') != null) { | |
3800 | - var contx = document.getElementById('tempCanvas').getContext('2d'); | |
3801 | - var tbTempCanvas = document.getElementById(tempCanvasID) | |
3802 | - contx.drawImage(tbTempCanvas, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); | |
3791 | + var tempCtx = document.getElementById(tempCanvasID).getContext('2d'); | |
3803 | 3792 | |
3804 | - } | |
3793 | + //keep the original image on temp canavs to use it in changing transparency | |
3805 | 3794 | |
3806 | - // get the image data values | |
3795 | + if (document.getElementById('tempCanvas') != null) { | |
3796 | + var contx = document.getElementById('tempCanvas').getContext('2d'); | |
3797 | + var tbTempCanvas = document.getElementById(tempCanvasID) | |
3798 | + contx.drawImage(tbTempCanvas, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); | |
3807 | 3799 | |
3808 | - var imageData = imageD.data; | |
3809 | - var length = imageData.length; | |
3800 | + } | |
3810 | 3801 | |
3811 | - //change background of image from transparent to white | |
3802 | + // get the image data values | |
3812 | 3803 | |
3813 | - // set every fourth value to 50 | |
3814 | - for (var i = 3; i < length; i += 4) { | |
3815 | - //NIKITA | |
3816 | - if ($scope.voId == "9" || $scope.voId == "11") { | |
3804 | + var imageData = imageD.data; | |
3805 | + var length = imageData.length; | |
3817 | 3806 | |
3818 | - if (imageData[i] == 0) { | |
3807 | + //change background of image from transparent to white | |
3808 | + | |
3809 | + // set every fourth value to 50 | |
3810 | + for (var i = 3; i < length; i += 4) { | |
3811 | + //NIKITA | |
3812 | + if ($scope.voId == "9" || $scope.voId == "11") { | |
3813 | + | |
3814 | + if (imageData[i] == 0) { | |
3819 | 3815 | |
3820 | - } | |
3821 | - else { | |
3822 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | |
3823 | - } | |
3824 | 3816 | } |
3825 | 3817 | else { |
3826 | 3818 | imageData[i] = ((255) * (parseInt(transNumber))) / 100; |
3827 | 3819 | } |
3828 | 3820 | } |
3821 | + else { | |
3822 | + imageData[i] = ((255) * (parseInt(transNumber))) / 100; | |
3823 | + } | |
3824 | + } | |
3829 | 3825 | |
3830 | 3826 | |
3831 | - tempCtx.putImageData(imageD, 0, 0); | |
3827 | + tempCtx.putImageData(imageD, 0, 0); | |
3828 | + | |
3832 | 3829 | |
3833 | - | |
3834 | 3830 | var ctx = transparencyCanvas.getContext('2d'); |
3835 | 3831 | |
3836 | 3832 | |
... | ... | @@ -4827,14 +4823,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4827 | 4823 | } |
4828 | 4824 | |
4829 | 4825 | |
4830 | - var context_gray = imageCanvas.getContext('2d'); | |
4826 | + var context_gray = imageCanvas.getContext('2d'); | |
4831 | 4827 | |
4832 | - var dataURL = imageCanvas.toDataURL(); | |
4828 | + var dataURL = imageCanvas.toDataURL(); | |
4833 | 4829 | |
4834 | 4830 | |
4835 | - var img = new Image(); | |
4831 | + var img = new Image(); | |
4836 | 4832 | |
4837 | - img.src = dataURL; | |
4833 | + img.src = dataURL; | |
4838 | 4834 | |
4839 | 4835 | img.onload = function () { |
4840 | 4836 | console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= ' |
... | ... | @@ -4857,26 +4853,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4857 | 4853 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); |
4858 | 4854 | |
4859 | 4855 | |
4860 | - context_gray.putImageData(DAData.data, 0, 0) | |
4856 | + context_gray.putImageData(DAData.data, 0, 0) | |
4861 | 4857 | |
4862 | 4858 | //NIKI- to resolve lateral arm black issue in highlight mode |
4863 | 4859 | |
4864 | 4860 | if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) { |
4865 | 4861 | |
4866 | - var imgData = context_gray.getImageData(0, 0, width, ht); | |
4867 | - var data = imgData.data; | |
4862 | + var imgData = context_gray.getImageData(0, 0, width, ht); | |
4863 | + var data = imgData.data; | |
4868 | 4864 | var c = 0; |
4869 | - for (var i = 0; i < data.length; i += 4) { | |
4870 | - if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
4871 | - data[i + 3] = 0; | |
4872 | - } | |
4873 | - | |
4865 | + for (var i = 0; i < data.length; i += 4) { | |
4866 | + if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
4867 | + data[i + 3] = 0; | |
4874 | 4868 | } |
4875 | - context_gray.putImageData(imgData, 0, 0); | |
4869 | + | |
4876 | 4870 | } |
4871 | + context_gray.putImageData(imgData, 0, 0); | |
4872 | + } | |
4877 | 4873 | |
4878 | - //push BRID into array | |
4879 | - $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | |
4874 | + //push BRID into array | |
4875 | + $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | |
4880 | 4876 | |
4881 | 4877 | var grayImageData = context_gray.getImageData(0, 0, width, ht); |
4882 | 4878 | var grayImageImageDataVar = grayImageData.data; |
... | ... | @@ -4926,10 +4922,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4926 | 4922 | |
4927 | 4923 | if ($scope.isEligibleForHighlightBodyByTermList == true) { |
4928 | 4924 | //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE |
4929 | - // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) { | |
4930 | - $scope.isLoading = false; | |
4925 | + // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) { | |
4926 | + $scope.isLoading = false; | |
4931 | 4927 | |
4932 | - $('#spinner').css('visibility', 'hidden'); | |
4928 | + $('#spinner').css('visibility', 'hidden'); | |
4933 | 4929 | //} |
4934 | 4930 | |
4935 | 4931 | if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { |
... | ... | @@ -5553,7 +5549,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5553 | 5549 | } |
5554 | 5550 | |
5555 | 5551 | } |
5556 | - | |
5552 | + | |
5557 | 5553 | } |
5558 | 5554 | |
5559 | 5555 | //Annotation tool event lsitener |
... | ... | @@ -5568,7 +5564,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5568 | 5564 | $scope.$on('annotationToolEvent', function (event, data) { |
5569 | 5565 | $("#canvas").css("display", "block"); |
5570 | 5566 | $("#canvasPaint").css("display", "block"); |
5571 | - | |
5567 | + | |
5572 | 5568 | $scope.doClick(); |
5573 | 5569 | $rootScope.FreeStylePaint(); |
5574 | 5570 | }); |
... | ... | @@ -5651,511 +5647,511 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5651 | 5647 | var canvasElement1 = document.getElementById("canvasPaint"); |
5652 | 5648 | var ctx1 = canvasElement1.getContext("2d"); |
5653 | 5649 | |
5654 | - /* if ($rootScope.shapeType == "FreeStylePaint") { | |
5655 | - var canvasPaint_zIndex = $('#canvasPaint').css("z-index"); | |
5656 | - var canvas_zIndex = $('#canvas').css("z-index"); | |
5657 | - if (canvas_zIndex > canvasPaint_zIndex) { | |
5658 | - canvasPaint_zIndex = parseInt(canvas_zIndex) + 1; | |
5650 | + /* if ($rootScope.shapeType == "FreeStylePaint") { | |
5651 | + var canvasPaint_zIndex = $('#canvasPaint').css("z-index"); | |
5652 | + var canvas_zIndex = $('#canvas').css("z-index"); | |
5653 | + if (canvas_zIndex > canvasPaint_zIndex) { | |
5654 | + canvasPaint_zIndex = parseInt(canvas_zIndex) + 1; | |
5655 | + | |
5656 | + } | |
5657 | + else { | |
5658 | + canvasPaint_zIndex = parseInt(canvasPaint_zIndex) + 1; | |
5659 | + } | |
5660 | + $('#canvasPaint').css("z-index", canvasPaint_zIndex); | |
5661 | + $('#canvasPaint').sketch({ defaultColor: "#000", defaultSize: 1 }); | |
5662 | + } | |
5663 | + else {*/ | |
5664 | + switch ($rootScope.shapeType) { | |
5659 | 5665 | |
5660 | - } | |
5661 | - else { | |
5662 | - canvasPaint_zIndex = parseInt(canvasPaint_zIndex) + 1; | |
5663 | - } | |
5664 | - $('#canvasPaint').css("z-index", canvasPaint_zIndex); | |
5665 | - $('#canvasPaint').sketch({ defaultColor: "#000", defaultSize: 1 }); | |
5666 | - } | |
5667 | - else {*/ | |
5668 | - switch ($rootScope.shapeType) { | |
5666 | + case "cursor": | |
5667 | + // ctx.clearRect(0, 0, 2277, 3248); | |
5668 | + ctx.beginPath(); | |
5669 | + ctx1.beginPath(); | |
5669 | 5670 | |
5670 | - case "cursor": | |
5671 | - // ctx.clearRect(0, 0, 2277, 3248); | |
5672 | - ctx.beginPath(); | |
5673 | - ctx1.beginPath(); | |
5674 | - | |
5675 | 5671 | |
5676 | - break; | |
5672 | + break; | |
5677 | 5673 | |
5678 | - case "Line": | |
5679 | - | |
5680 | - $rootScope.resetLine = $rootScope.ObjectIndex++; | |
5681 | - $('#canvas').addLayer({ | |
5682 | - name: 'Line_' + $rootScope.resetLine, | |
5683 | - layer: true, | |
5684 | - type: 'line', | |
5685 | - draggable: true, | |
5686 | - strokeStyle: $rootScope.shapestyleborderColor, | |
5687 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
5688 | - rounded: true, | |
5689 | - x1: $scope.offsetX1, y1: $scope.offsetY1, | |
5690 | - x2: $scope.x, y2: $scope.y, | |
5691 | - | |
5692 | - click: function (layer) { | |
5693 | - $rootScope.canvasLayerNameCollection = []; | |
5694 | - $rootScope.canvasLayerNameCollection.push(layer.name); | |
5695 | - $('#canvas').setLayer(layer.name, { | |
5696 | - handle: { | |
5697 | - type: 'arc', | |
5698 | - fillStyle: '#fff', | |
5699 | - strokeStyle: '#c33', | |
5700 | - strokeWidth: 2, | |
5701 | - radius: 3 | |
5702 | - } | |
5703 | - }).drawLayers(); | |
5704 | - | |
5705 | - | |
5706 | - }, | |
5707 | - mouseout: function (layer) { | |
5708 | - $rootScope.canvasLayerNameCollection = []; | |
5709 | - $('#canvas').setLayer(layer.name, { | |
5710 | - handle: { | |
5711 | - type: 'arc', | |
5712 | - fillStyle: '#fff', | |
5713 | - strokeStyle: '#c33', | |
5714 | - strokeWidth: 0, | |
5715 | - radius: 0 | |
5716 | - } | |
5674 | + case "Line": | |
5675 | + | |
5676 | + $rootScope.resetLine = $rootScope.ObjectIndex++; | |
5677 | + $('#canvas').addLayer({ | |
5678 | + name: 'Line_' + $rootScope.resetLine, | |
5679 | + layer: true, | |
5680 | + type: 'line', | |
5681 | + draggable: true, | |
5682 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5683 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5684 | + rounded: true, | |
5685 | + x1: $scope.offsetX1, y1: $scope.offsetY1, | |
5686 | + x2: $scope.x, y2: $scope.y, | |
5687 | + | |
5688 | + click: function (layer) { | |
5689 | + $rootScope.canvasLayerNameCollection = []; | |
5690 | + $rootScope.canvasLayerNameCollection.push(layer.name); | |
5691 | + $('#canvas').setLayer(layer.name, { | |
5692 | + handle: { | |
5693 | + type: 'arc', | |
5694 | + fillStyle: '#fff', | |
5695 | + strokeStyle: '#c33', | |
5696 | + strokeWidth: 2, | |
5697 | + radius: 3 | |
5698 | + } | |
5699 | + }).drawLayers(); | |
5717 | 5700 | |
5718 | - }).drawLayers(); | |
5719 | 5701 | |
5720 | - }, | |
5721 | - mouseover: function (layer) { | |
5702 | + }, | |
5703 | + mouseout: function (layer) { | |
5704 | + $rootScope.canvasLayerNameCollection = []; | |
5705 | + $('#canvas').setLayer(layer.name, { | |
5706 | + handle: { | |
5707 | + type: 'arc', | |
5708 | + fillStyle: '#fff', | |
5709 | + strokeStyle: '#c33', | |
5710 | + strokeWidth: 0, | |
5711 | + radius: 0 | |
5712 | + } | |
5722 | 5713 | |
5714 | + }).drawLayers(); | |
5723 | 5715 | |
5724 | - $('#canvas').setLayer(layer.name, { | |
5725 | - handle: { | |
5726 | - type: 'arc', | |
5727 | - fillStyle: '#fff', | |
5728 | - strokeStyle: '#c33', | |
5729 | - strokeWidth: 2, | |
5730 | - radius: 3 | |
5731 | - } | |
5732 | - }).drawLayers(); | |
5716 | + }, | |
5717 | + mouseover: function (layer) { | |
5733 | 5718 | |
5734 | - } | |
5735 | 5719 | |
5736 | - }).drawLayers(); | |
5737 | - $('.btnCursor').trigger('click'); | |
5738 | - $(".btn-annotation").removeClass("activebtncolor"); | |
5739 | - $('.btnCursor').addClass('activebtncolor'); | |
5740 | - break; | |
5720 | + $('#canvas').setLayer(layer.name, { | |
5721 | + handle: { | |
5722 | + type: 'arc', | |
5723 | + fillStyle: '#fff', | |
5724 | + strokeStyle: '#c33', | |
5725 | + strokeWidth: 2, | |
5726 | + radius: 3 | |
5727 | + } | |
5728 | + }).drawLayers(); | |
5741 | 5729 | |
5742 | - case "Rectangle": | |
5743 | - $rootScope.resetRect = $rootScope.ObjectIndex++; | |
5744 | - | |
5745 | - $('#canvas').addLayer({ | |
5746 | - layer: true, | |
5747 | - name: 'Rect_' + $rootScope.resetRect, | |
5748 | - fillStyle: $rootScope.shapestyleFillColor, | |
5749 | - type: 'rectangle', | |
5750 | - draggable: true, | |
5751 | - strokeStyle: $rootScope.shapestyleborderColor, | |
5752 | - opacity: $rootScope.shapestyleOpacity, | |
5753 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
5754 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
5755 | - width: $scope.x - $scope.offsetX1, | |
5756 | - height: $scope.y - $scope.offsetY1, | |
5757 | - | |
5758 | - resizeFromCenter: false, | |
5759 | - | |
5760 | - | |
5761 | - click: function (layer) { | |
5762 | - $rootScope.canvasLayerNameCollection = []; | |
5763 | - $rootScope.canvasLayerNameCollection.push(layer.name); | |
5764 | - $('#canvas').setLayer(layer.name, { | |
5765 | - handle: { | |
5766 | - type: 'rectangle', | |
5767 | - fillStyle: '#fff', | |
5768 | - strokeStyle: '#c33', | |
5769 | - strokeWidth: 2, | |
5770 | - width: 5, height: 5, | |
5771 | - cornerRadius: 3 | |
5772 | - } | |
5773 | - }).drawLayers(); | |
5774 | - | |
5775 | - }, | |
5776 | - mouseout: function (layer) { | |
5777 | - $rootScope.canvasLayerNameCollection = []; | |
5778 | - $('#canvas').setLayer(layer.name, { | |
5779 | - handle: { | |
5780 | - type: 'rectangle', | |
5781 | - fillStyle: 'pink', | |
5782 | - strokeStyle: 'yellow', | |
5783 | - strokeWidth: 0, | |
5784 | - width: 0, height: 0, | |
5785 | - cornerRadius: 0 | |
5786 | - } | |
5730 | + } | |
5787 | 5731 | |
5788 | - }).drawLayers(); | |
5732 | + }).drawLayers(); | |
5733 | + $('.btnCursor').trigger('click'); | |
5734 | + $(".btn-annotation").removeClass("activebtncolor"); | |
5735 | + $('.btnCursor').addClass('activebtncolor'); | |
5736 | + break; | |
5789 | 5737 | |
5790 | - }, | |
5791 | - mouseover: function (layer) { | |
5738 | + case "Rectangle": | |
5739 | + $rootScope.resetRect = $rootScope.ObjectIndex++; | |
5740 | + | |
5741 | + $('#canvas').addLayer({ | |
5742 | + layer: true, | |
5743 | + name: 'Rect_' + $rootScope.resetRect, | |
5744 | + fillStyle: $rootScope.shapestyleFillColor, | |
5745 | + type: 'rectangle', | |
5746 | + draggable: true, | |
5747 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5748 | + opacity: $rootScope.shapestyleOpacity, | |
5749 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5750 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
5751 | + width: $scope.x - $scope.offsetX1, | |
5752 | + height: $scope.y - $scope.offsetY1, | |
5753 | + | |
5754 | + resizeFromCenter: false, | |
5755 | + | |
5756 | + | |
5757 | + click: function (layer) { | |
5758 | + $rootScope.canvasLayerNameCollection = []; | |
5759 | + $rootScope.canvasLayerNameCollection.push(layer.name); | |
5760 | + $('#canvas').setLayer(layer.name, { | |
5761 | + handle: { | |
5762 | + type: 'rectangle', | |
5763 | + fillStyle: '#fff', | |
5764 | + strokeStyle: '#c33', | |
5765 | + strokeWidth: 2, | |
5766 | + width: 5, height: 5, | |
5767 | + cornerRadius: 3 | |
5768 | + } | |
5769 | + }).drawLayers(); | |
5792 | 5770 | |
5771 | + }, | |
5772 | + mouseout: function (layer) { | |
5773 | + $rootScope.canvasLayerNameCollection = []; | |
5774 | + $('#canvas').setLayer(layer.name, { | |
5775 | + handle: { | |
5776 | + type: 'rectangle', | |
5777 | + fillStyle: 'pink', | |
5778 | + strokeStyle: 'yellow', | |
5779 | + strokeWidth: 0, | |
5780 | + width: 0, height: 0, | |
5781 | + cornerRadius: 0 | |
5782 | + } | |
5793 | 5783 | |
5794 | - $('#canvas').setLayer(layer.name, { | |
5795 | - handle: { | |
5796 | - type: 'rectangle', | |
5797 | - fillStyle: '#fff', | |
5798 | - strokeStyle: '#c33', | |
5799 | - strokeWidth: 2, | |
5800 | - width: 5, height: 5, | |
5801 | - cornerRadius: 3 | |
5802 | - } | |
5803 | - }).drawLayers(); | |
5784 | + }).drawLayers(); | |
5804 | 5785 | |
5805 | - } | |
5806 | - }).drawLayers(); | |
5786 | + }, | |
5787 | + mouseover: function (layer) { | |
5807 | 5788 | |
5808 | 5789 | |
5790 | + $('#canvas').setLayer(layer.name, { | |
5791 | + handle: { | |
5792 | + type: 'rectangle', | |
5793 | + fillStyle: '#fff', | |
5794 | + strokeStyle: '#c33', | |
5795 | + strokeWidth: 2, | |
5796 | + width: 5, height: 5, | |
5797 | + cornerRadius: 3 | |
5798 | + } | |
5799 | + }).drawLayers(); | |
5809 | 5800 | |
5810 | - $('.btnCursor').trigger('click'); | |
5811 | - $(".btn-annotation").removeClass("activebtncolor"); | |
5812 | - $('.btnCursor').addClass('activebtncolor'); | |
5801 | + } | |
5802 | + }).drawLayers(); | |
5813 | 5803 | |
5814 | - break; | |
5815 | 5804 | |
5816 | - case "Circle": | |
5817 | - // alert($rootScope.shapestyleborderWidth); | |
5818 | - $rootScope.resetCircle = $rootScope.ObjectIndex++; | |
5819 | - $('#canvas').addLayer({ | |
5820 | - layer: true, | |
5821 | - name: 'Circle_' + $rootScope.resetCircle, | |
5822 | - type: 'ellipse', | |
5823 | - opacity: $rootScope.shapestyleOpacity, | |
5824 | - draggable: true, | |
5825 | - strokeStyle: $rootScope.shapestyleborderColor, | |
5826 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
5827 | - fillStyle: $rootScope.shapestyleFillColor, | |
5828 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
5829 | - width: ($scope.x - $scope.offsetX1) * 2, height: ($scope.y - $scope.offsetY1) * 2, | |
5830 | - // Place a handle at each side and each corner | |
5831 | - handlePlacement: 'both', | |
5832 | - | |
5833 | - | |
5834 | - | |
5835 | - click: function (layer) { | |
5836 | - $rootScope.canvasLayerNameCollection = []; | |
5837 | - $rootScope.canvasLayerNameCollection.push(layer.name); | |
5838 | - $('#canvas').setLayer(layer.name, { | |
5839 | - handle: { | |
5840 | - type: 'arc', | |
5841 | - fillStyle: '#fff', | |
5842 | - strokeStyle: '#c33', | |
5843 | - strokeWidth: 2, | |
5844 | - radius: 3 | |
5845 | - } | |
5846 | - }).drawLayers(); | |
5847 | - | |
5848 | - }, | |
5849 | - mouseout: function (layer) { | |
5850 | - $rootScope.canvasLayerNameCollection = []; | |
5851 | - $('#canvas').setLayer(layer.name, { | |
5852 | - handle: { | |
5853 | - type: 'arc', | |
5854 | - fillStyle: '#fff', | |
5855 | - strokeStyle: '#c33', | |
5856 | - strokeWidth: 0, | |
5857 | - // width: 0, height: 0, | |
5858 | - radius: 0 | |
5859 | - } | |
5860 | 5805 | |
5861 | - }).drawLayers(); | |
5806 | + $('.btnCursor').trigger('click'); | |
5807 | + $(".btn-annotation").removeClass("activebtncolor"); | |
5808 | + $('.btnCursor').addClass('activebtncolor'); | |
5862 | 5809 | |
5863 | - }, | |
5864 | - mouseover: function (layer) { | |
5810 | + break; | |
5865 | 5811 | |
5812 | + case "Circle": | |
5813 | + // alert($rootScope.shapestyleborderWidth); | |
5814 | + $rootScope.resetCircle = $rootScope.ObjectIndex++; | |
5815 | + $('#canvas').addLayer({ | |
5816 | + layer: true, | |
5817 | + name: 'Circle_' + $rootScope.resetCircle, | |
5818 | + type: 'ellipse', | |
5819 | + opacity: $rootScope.shapestyleOpacity, | |
5820 | + draggable: true, | |
5821 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5822 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5823 | + fillStyle: $rootScope.shapestyleFillColor, | |
5824 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
5825 | + width: ($scope.x - $scope.offsetX1) * 2, height: ($scope.y - $scope.offsetY1) * 2, | |
5826 | + // Place a handle at each side and each corner | |
5827 | + handlePlacement: 'both', | |
5828 | + | |
5829 | + | |
5830 | + | |
5831 | + click: function (layer) { | |
5832 | + $rootScope.canvasLayerNameCollection = []; | |
5833 | + $rootScope.canvasLayerNameCollection.push(layer.name); | |
5834 | + $('#canvas').setLayer(layer.name, { | |
5835 | + handle: { | |
5836 | + type: 'arc', | |
5837 | + fillStyle: '#fff', | |
5838 | + strokeStyle: '#c33', | |
5839 | + strokeWidth: 2, | |
5840 | + radius: 3 | |
5841 | + } | |
5842 | + }).drawLayers(); | |
5866 | 5843 | |
5867 | - $('#canvas').setLayer(layer.name, { | |
5868 | - handle: { | |
5869 | - type: 'arc', | |
5870 | - fillStyle: '#fff', | |
5871 | - strokeStyle: '#c33', | |
5872 | - strokeWidth: 2, | |
5873 | - // width: 5, height: 5, | |
5874 | - radius: 3 | |
5875 | - } | |
5876 | - }).drawLayers(); | |
5844 | + }, | |
5845 | + mouseout: function (layer) { | |
5846 | + $rootScope.canvasLayerNameCollection = []; | |
5847 | + $('#canvas').setLayer(layer.name, { | |
5848 | + handle: { | |
5849 | + type: 'arc', | |
5850 | + fillStyle: '#fff', | |
5851 | + strokeStyle: '#c33', | |
5852 | + strokeWidth: 0, | |
5853 | + // width: 0, height: 0, | |
5854 | + radius: 0 | |
5855 | + } | |
5877 | 5856 | |
5878 | - } | |
5879 | - }).drawLayers(); | |
5880 | - $('.btnCursor').trigger('click'); | |
5881 | - $(".btn-annotation").removeClass("activebtncolor"); | |
5882 | - $('.btnCursor').addClass('activebtncolor'); | |
5883 | - break; | |
5884 | - case "Arrow": | |
5885 | - $rootScope.resetArrow = $rootScope.ObjectIndex++; | |
5886 | - | |
5887 | - $('#canvas').drawLine({ | |
5888 | - layer: true, | |
5889 | - name: 'Arrow_' + $rootScope.resetArrow, | |
5890 | - draggable: true, | |
5891 | - strokeStyle: $rootScope.shapestyleborderColor, | |
5892 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
5893 | - rounded: true, | |
5894 | - startArrow: true, | |
5895 | - arrowRadius: 7, | |
5896 | - arrowAngle: 90, | |
5897 | - x1: $scope.offsetX1, y1: $scope.offsetY1, | |
5898 | - x2: $scope.x, y2: $scope.y, | |
5899 | - | |
5900 | - click: function (layer) { | |
5901 | - $rootScope.canvasLayerNameCollection = []; | |
5902 | - $rootScope.canvasLayerNameCollection.push(layer.name); | |
5903 | - $('#canvas').setLayer(layer.name, { | |
5904 | - handle: { | |
5905 | - type: 'arc', | |
5906 | - fillStyle: '#fff', | |
5907 | - strokeStyle: '#c33', | |
5908 | - strokeWidth: 2, | |
5909 | - // width: 5, height: 5, | |
5910 | - radius: 3 | |
5911 | - } | |
5912 | - }).drawLayers(); | |
5913 | - // $("#canvas").removeLayer(layer.name).drawLayers(); | |
5914 | - | |
5915 | - }, | |
5916 | - mouseout: function (layer) { | |
5917 | - $rootScope.canvasLayerNameCollection = []; | |
5918 | - $('#canvas').setLayer(layer.name, { | |
5919 | - handle: { | |
5920 | - type: 'arc', | |
5921 | - fillStyle: '#fff', | |
5922 | - strokeStyle: '#c33', | |
5923 | - strokeWidth: 0, | |
5924 | - // width: 0, height: 0, | |
5925 | - radius: 0 | |
5926 | - } | |
5857 | + }).drawLayers(); | |
5927 | 5858 | |
5928 | - }).drawLayers(); | |
5859 | + }, | |
5860 | + mouseover: function (layer) { | |
5929 | 5861 | |
5930 | - }, | |
5931 | - mouseover: function (layer) { | |
5932 | 5862 | |
5863 | + $('#canvas').setLayer(layer.name, { | |
5864 | + handle: { | |
5865 | + type: 'arc', | |
5866 | + fillStyle: '#fff', | |
5867 | + strokeStyle: '#c33', | |
5868 | + strokeWidth: 2, | |
5869 | + // width: 5, height: 5, | |
5870 | + radius: 3 | |
5871 | + } | |
5872 | + }).drawLayers(); | |
5933 | 5873 | |
5934 | - $('#canvas').setLayer(layer.name, { | |
5935 | - handle: { | |
5936 | - type: 'arc', | |
5937 | - fillStyle: '#fff', | |
5938 | - strokeStyle: '#c33', | |
5939 | - strokeWidth: 2, | |
5940 | - // width: 5, height: 5, | |
5941 | - radius: 3 | |
5942 | - } | |
5943 | - }).drawLayers(); | |
5874 | + } | |
5875 | + }).drawLayers(); | |
5876 | + $('.btnCursor').trigger('click'); | |
5877 | + $(".btn-annotation").removeClass("activebtncolor"); | |
5878 | + $('.btnCursor').addClass('activebtncolor'); | |
5879 | + break; | |
5880 | + case "Arrow": | |
5881 | + $rootScope.resetArrow = $rootScope.ObjectIndex++; | |
5882 | + | |
5883 | + $('#canvas').drawLine({ | |
5884 | + layer: true, | |
5885 | + name: 'Arrow_' + $rootScope.resetArrow, | |
5886 | + draggable: true, | |
5887 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5888 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5889 | + rounded: true, | |
5890 | + startArrow: true, | |
5891 | + arrowRadius: 7, | |
5892 | + arrowAngle: 90, | |
5893 | + x1: $scope.offsetX1, y1: $scope.offsetY1, | |
5894 | + x2: $scope.x, y2: $scope.y, | |
5895 | + | |
5896 | + click: function (layer) { | |
5897 | + $rootScope.canvasLayerNameCollection = []; | |
5898 | + $rootScope.canvasLayerNameCollection.push(layer.name); | |
5899 | + $('#canvas').setLayer(layer.name, { | |
5900 | + handle: { | |
5901 | + type: 'arc', | |
5902 | + fillStyle: '#fff', | |
5903 | + strokeStyle: '#c33', | |
5904 | + strokeWidth: 2, | |
5905 | + // width: 5, height: 5, | |
5906 | + radius: 3 | |
5907 | + } | |
5908 | + }).drawLayers(); | |
5909 | + // $("#canvas").removeLayer(layer.name).drawLayers(); | |
5944 | 5910 | |
5945 | - } | |
5911 | + }, | |
5912 | + mouseout: function (layer) { | |
5913 | + $rootScope.canvasLayerNameCollection = []; | |
5914 | + $('#canvas').setLayer(layer.name, { | |
5915 | + handle: { | |
5916 | + type: 'arc', | |
5917 | + fillStyle: '#fff', | |
5918 | + strokeStyle: '#c33', | |
5919 | + strokeWidth: 0, | |
5920 | + // width: 0, height: 0, | |
5921 | + radius: 0 | |
5922 | + } | |
5946 | 5923 | |
5947 | - }); | |
5948 | - $('.btnCursor').trigger('click'); | |
5949 | - $(".btn-annotation").removeClass("activebtncolor"); | |
5950 | - $('.btnCursor').addClass('activebtncolor'); | |
5924 | + }).drawLayers(); | |
5951 | 5925 | |
5952 | - // $scope.resetRect += 1; | |
5953 | - break; | |
5954 | - case "Pin": | |
5955 | - | |
5956 | - $rootScope.resetPin = $rootScope.Object2Index++; | |
5957 | - $rootScope.resetPinArc = $rootScope.Object1Index++; | |
5958 | - var radial = $('canvas').createGradient({ | |
5959 | - x1: 50, y1: 50, | |
5960 | - x2: 50, y2: 50, | |
5961 | - r1: 10, r2: 30, | |
5962 | - c1: 'rgba(100, 50, 0,0)', | |
5963 | - c2: 'grey' | |
5964 | - }); | |
5965 | - $('#canvas').drawLine({ | |
5966 | - draggable: true, | |
5967 | - layer: true, | |
5968 | - name: "Pin_" + $rootScope.resetPin, | |
5969 | - groups: ["Pin_" + $rootScope.resetPin], | |
5970 | - dragGroups: ["Pin_" + $rootScope.resetPin], | |
5971 | - strokeStyle: 'black', | |
5972 | - strokeWidth: 2, | |
5973 | - x1: $scope.offsetX1, y1: $scope.offsetY1, | |
5974 | - x2: $scope.x, y2: $scope.y, | |
5975 | - | |
5976 | - click: function (layer) { | |
5977 | - // debugger; | |
5978 | - $rootScope.shapeTypePin = "Pin"; | |
5979 | - $rootScope.canvasLayerNameCollection = []; | |
5980 | - var pinLine_layer = layer.name; | |
5981 | - var pinLine_layer_split = pinLine_layer.split("_"); | |
5982 | - var pinArcName = "ArcPin_"; | |
5983 | - var pinResult = pinArcName.concat(pinLine_layer_split[1]); | |
5984 | - | |
5985 | - $rootScope.canvasLayerNameCollection.push({ pinName: layer.name, ArcName: pinResult }); | |
5986 | - | |
5987 | - $('#canvas').setLayer(layer.name, { | |
5988 | - handle: { | |
5989 | - type: 'arc', | |
5990 | - fillStyle: '#fff', | |
5991 | - strokeStyle: '#c33', | |
5992 | - strokeWidth: 2, | |
5993 | - // width: 5, height: 5, | |
5994 | - radius: 3 | |
5995 | - } | |
5996 | - }).drawLayers(); | |
5997 | - | |
5998 | - | |
5999 | - }, | |
6000 | - mouseout: function (layer) { | |
6001 | - // $rootScope.resetPinArc = ""; | |
6002 | - // ax = ""; | |
6003 | - | |
6004 | - $rootScope.canvasLayerNameCollection = []; | |
6005 | - $('#canvas').setLayer(layer.name, { | |
6006 | - handle: { | |
6007 | - type: 'arc', | |
6008 | - fillStyle: '#fff', | |
6009 | - strokeStyle: '#c33', | |
6010 | - strokeWidth: 0, | |
6011 | - // width: 0, height: 0, | |
6012 | - radius: 0 | |
6013 | - } | |
5926 | + }, | |
5927 | + mouseover: function (layer) { | |
6014 | 5928 | |
6015 | - }).drawLayers(); | |
6016 | 5929 | |
6017 | - }, | |
6018 | - mouseover: function (layer) { | |
5930 | + $('#canvas').setLayer(layer.name, { | |
5931 | + handle: { | |
5932 | + type: 'arc', | |
5933 | + fillStyle: '#fff', | |
5934 | + strokeStyle: '#c33', | |
5935 | + strokeWidth: 2, | |
5936 | + // width: 5, height: 5, | |
5937 | + radius: 3 | |
5938 | + } | |
5939 | + }).drawLayers(); | |
6019 | 5940 | |
5941 | + } | |
6020 | 5942 | |
6021 | - $('#canvas').setLayer(layer.name, { | |
6022 | - handle: { | |
6023 | - type: 'arc', | |
6024 | - fillStyle: '#fff', | |
6025 | - strokeStyle: '#c33', | |
6026 | - strokeWidth: 2, | |
6027 | - // width: 5, height: 5, | |
6028 | - radius: 3 | |
6029 | - } | |
6030 | - }).drawLayers(); | |
5943 | + }); | |
5944 | + $('.btnCursor').trigger('click'); | |
5945 | + $(".btn-annotation").removeClass("activebtncolor"); | |
5946 | + $('.btnCursor').addClass('activebtncolor'); | |
6031 | 5947 | |
6032 | - } | |
6033 | - }).drawArc({ | |
6034 | - draggable: true, | |
6035 | - name: "ArcPin_" + $rootScope.resetPinArc, | |
6036 | - // name: "Pin_" + $rootScope.resetPin, | |
6037 | - layer: true, | |
6038 | - groups: ["Pin_" + $rootScope.resetPin], | |
6039 | - dragGroups: ["Pin_" + $rootScope.resetPin], | |
6040 | - strokeStyle: 'grey', | |
6041 | - strokeWidth: 2, | |
6042 | - fillStyle: radial, | |
6043 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6044 | - radius: 5, | |
6045 | - //handle: { | |
6046 | - // type: 'arc', | |
6047 | - // fillStyle: '#fff', | |
6048 | - // strokeStyle: '#c33', | |
6049 | - // strokeWidth: 2, | |
6050 | - // radius: 3 | |
6051 | - //}, | |
6052 | - add: function (layer) { | |
6053 | - | |
6054 | - $rootScope.resetPinArc = layer.name; | |
6055 | - // $scope.arr = []; | |
6056 | - | |
6057 | - | |
6058 | - }, | |
6059 | - | |
6060 | - }).drawLayers(); | |
6061 | - $('.btnCursor').trigger('click'); | |
6062 | - $(".btn-annotation").removeClass("activebtncolor"); | |
6063 | - $('.btnCursor').addClass('activebtncolor'); | |
6064 | - break; | |
6065 | - case "TextArea": | |
6066 | - | |
6067 | - // Draw text | |
6068 | - $rootScope.resetTextRect = $rootScope.ObjectIndex++; | |
6069 | - $rootScope.resetText = $rootScope.ObjectIndex++; | |
6070 | - $('#canvas').drawText({ | |
6071 | - layer: true, | |
6072 | - draggable: true, | |
6073 | - // opacity: $rootScope.shapestyleOpacity, | |
6074 | - name: 'TextArea_' + $rootScope.resetText, | |
6075 | - groups: ['TextArea_' + $rootScope.resetText], | |
6076 | - dragGroups: ['TextArea_' + $rootScope.resetText], | |
6077 | - fillStyle: '#36c', | |
6078 | - strokeWidth: 0, | |
6079 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6080 | - fontSize: '14pt', | |
6081 | - align: "left", | |
6082 | - fontFamily: 'Verdana, sans-serif', | |
6083 | - text: '' | |
5948 | + // $scope.resetRect += 1; | |
5949 | + break; | |
5950 | + case "Pin": | |
5951 | + | |
5952 | + $rootScope.resetPin = $rootScope.Object2Index++; | |
5953 | + $rootScope.resetPinArc = $rootScope.Object1Index++; | |
5954 | + var radial = $('canvas').createGradient({ | |
5955 | + x1: 50, y1: 50, | |
5956 | + x2: 50, y2: 50, | |
5957 | + r1: 10, r2: 30, | |
5958 | + c1: 'rgba(100, 50, 0,0)', | |
5959 | + c2: 'grey' | |
5960 | + }); | |
5961 | + $('#canvas').drawLine({ | |
5962 | + draggable: true, | |
5963 | + layer: true, | |
5964 | + name: "Pin_" + $rootScope.resetPin, | |
5965 | + groups: ["Pin_" + $rootScope.resetPin], | |
5966 | + dragGroups: ["Pin_" + $rootScope.resetPin], | |
5967 | + strokeStyle: 'black', | |
5968 | + strokeWidth: 2, | |
5969 | + x1: $scope.offsetX1, y1: $scope.offsetY1, | |
5970 | + x2: $scope.x, y2: $scope.y, | |
5971 | + | |
5972 | + click: function (layer) { | |
5973 | + // debugger; | |
5974 | + $rootScope.shapeTypePin = "Pin"; | |
5975 | + $rootScope.canvasLayerNameCollection = []; | |
5976 | + var pinLine_layer = layer.name; | |
5977 | + var pinLine_layer_split = pinLine_layer.split("_"); | |
5978 | + var pinArcName = "ArcPin_"; | |
5979 | + var pinResult = pinArcName.concat(pinLine_layer_split[1]); | |
5980 | + | |
5981 | + $rootScope.canvasLayerNameCollection.push({ pinName: layer.name, ArcName: pinResult }); | |
5982 | + | |
5983 | + $('#canvas').setLayer(layer.name, { | |
5984 | + handle: { | |
5985 | + type: 'arc', | |
5986 | + fillStyle: '#fff', | |
5987 | + strokeStyle: '#c33', | |
5988 | + strokeWidth: 2, | |
5989 | + // width: 5, height: 5, | |
5990 | + radius: 3 | |
5991 | + } | |
5992 | + }).drawLayers(); | |
6084 | 5993 | |
6085 | 5994 | |
5995 | + }, | |
5996 | + mouseout: function (layer) { | |
5997 | + // $rootScope.resetPinArc = ""; | |
5998 | + // ax = ""; | |
5999 | + | |
6000 | + $rootScope.canvasLayerNameCollection = []; | |
6001 | + $('#canvas').setLayer(layer.name, { | |
6002 | + handle: { | |
6003 | + type: 'arc', | |
6004 | + fillStyle: '#fff', | |
6005 | + strokeStyle: '#c33', | |
6006 | + strokeWidth: 0, | |
6007 | + // width: 0, height: 0, | |
6008 | + radius: 0 | |
6009 | + } | |
6086 | 6010 | |
6087 | - }) | |
6088 | - // Draw rect as wide as the text | |
6089 | - .drawRect({ | |
6090 | - layer: true, | |
6091 | - name: "TextRect_" + $rootScope.resetTextRect, | |
6092 | - dragGroups: ['shapes'], | |
6093 | - opacity: $rootScope.shapestyleOpacity, | |
6094 | - strokeStyle: $rootScope.shapestyleborderColor, | |
6095 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
6096 | - fillStyle: $rootScope.shapestyleFillColor, | |
6097 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6098 | - width: $scope.x - $scope.offsetX1, | |
6099 | - height: $scope.y - $scope.offsetY1, | |
6100 | - click: function (layer) { | |
6101 | - | |
6102 | - $rootScope.canvasLayerNameCollection = []; | |
6103 | - $rootScope.canvasLayerNameCollection.push(layer.name); | |
6104 | - $('#canvas').setLayer(layer.name, { | |
6105 | - handle: { | |
6106 | - type: 'rectangle', | |
6107 | - fillStyle: '#fff', | |
6108 | - strokeStyle: '#c33', | |
6109 | - strokeWidth: 2, | |
6110 | - width: 5, height: 5, | |
6111 | - cornerRadius: 3 | |
6112 | - } | |
6113 | - }).drawLayers(); | |
6114 | - | |
6115 | - }, | |
6116 | - mouseout: function (layer) { | |
6117 | - $rootScope.canvasLayerNameCollection = []; | |
6118 | - $('#canvas').setLayer(layer.name, { | |
6119 | - handle: { | |
6120 | - type: 'rectangle', | |
6121 | - fillStyle: 'pink', | |
6122 | - strokeStyle: 'yellow', | |
6123 | - strokeWidth: 0, | |
6124 | - width: 0, height: 0, | |
6125 | - cornerRadius: 0 | |
6126 | - } | |
6011 | + }).drawLayers(); | |
6127 | 6012 | |
6128 | - }).drawLayers(); | |
6013 | + }, | |
6014 | + mouseover: function (layer) { | |
6129 | 6015 | |
6130 | - }, | |
6131 | - mouseover: function (layer) { | |
6132 | 6016 | |
6133 | - $('#canvas').setLayer(layer.name, { | |
6134 | - handle: { | |
6135 | - type: 'rectangle', | |
6136 | - fillStyle: '#fff', | |
6137 | - strokeStyle: '#c33', | |
6138 | - strokeWidth: 2, | |
6139 | - width: 5, height: 5, | |
6140 | - cornerRadius: 3 | |
6141 | - } | |
6142 | - }).drawLayers(); | |
6017 | + $('#canvas').setLayer(layer.name, { | |
6018 | + handle: { | |
6019 | + type: 'arc', | |
6020 | + fillStyle: '#fff', | |
6021 | + strokeStyle: '#c33', | |
6022 | + strokeWidth: 2, | |
6023 | + // width: 5, height: 5, | |
6024 | + radius: 3 | |
6025 | + } | |
6026 | + }).drawLayers(); | |
6143 | 6027 | |
6144 | - } | |
6145 | - }); | |
6028 | + } | |
6029 | + }).drawArc({ | |
6030 | + draggable: true, | |
6031 | + name: "ArcPin_" + $rootScope.resetPinArc, | |
6032 | + // name: "Pin_" + $rootScope.resetPin, | |
6033 | + layer: true, | |
6034 | + groups: ["Pin_" + $rootScope.resetPin], | |
6035 | + dragGroups: ["Pin_" + $rootScope.resetPin], | |
6036 | + strokeStyle: 'grey', | |
6037 | + strokeWidth: 2, | |
6038 | + fillStyle: radial, | |
6039 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
6040 | + radius: 5, | |
6041 | + //handle: { | |
6042 | + // type: 'arc', | |
6043 | + // fillStyle: '#fff', | |
6044 | + // strokeStyle: '#c33', | |
6045 | + // strokeWidth: 2, | |
6046 | + // radius: 3 | |
6047 | + //}, | |
6048 | + add: function (layer) { | |
6049 | + | |
6050 | + $rootScope.resetPinArc = layer.name; | |
6051 | + // $scope.arr = []; | |
6146 | 6052 | |
6147 | 6053 | |
6148 | - $("#annotationTextModal").modal("toggle"); | |
6149 | - $('.btnCursor').trigger('click'); | |
6150 | - $(".btn-annotation").removeClass("activebtncolor"); | |
6151 | - $('.btnCursor').addClass('activebtncolor'); | |
6152 | - break; | |
6054 | + }, | |
6153 | 6055 | |
6154 | - case "DrawPolygon": | |
6056 | + }).drawLayers(); | |
6057 | + $('.btnCursor').trigger('click'); | |
6058 | + $(".btn-annotation").removeClass("activebtncolor"); | |
6059 | + $('.btnCursor').addClass('activebtncolor'); | |
6060 | + break; | |
6061 | + case "TextArea": | |
6062 | + | |
6063 | + // Draw text | |
6064 | + $rootScope.resetTextRect = $rootScope.ObjectIndex++; | |
6065 | + $rootScope.resetText = $rootScope.ObjectIndex++; | |
6066 | + $('#canvas').drawText({ | |
6067 | + layer: true, | |
6068 | + draggable: true, | |
6069 | + // opacity: $rootScope.shapestyleOpacity, | |
6070 | + name: 'TextArea_' + $rootScope.resetText, | |
6071 | + groups: ['TextArea_' + $rootScope.resetText], | |
6072 | + dragGroups: ['TextArea_' + $rootScope.resetText], | |
6073 | + fillStyle: '#36c', | |
6074 | + strokeWidth: 0, | |
6075 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
6076 | + fontSize: '14pt', | |
6077 | + align: "left", | |
6078 | + fontFamily: 'Verdana, sans-serif', | |
6079 | + text: '' | |
6080 | + | |
6081 | + | |
6082 | + | |
6083 | + }) | |
6084 | + // Draw rect as wide as the text | |
6085 | + .drawRect({ | |
6086 | + layer: true, | |
6087 | + name: "TextRect_" + $rootScope.resetTextRect, | |
6088 | + dragGroups: ['shapes'], | |
6089 | + opacity: $rootScope.shapestyleOpacity, | |
6090 | + strokeStyle: $rootScope.shapestyleborderColor, | |
6091 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
6092 | + fillStyle: $rootScope.shapestyleFillColor, | |
6093 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
6094 | + width: $scope.x - $scope.offsetX1, | |
6095 | + height: $scope.y - $scope.offsetY1, | |
6096 | + click: function (layer) { | |
6097 | + | |
6098 | + $rootScope.canvasLayerNameCollection = []; | |
6099 | + $rootScope.canvasLayerNameCollection.push(layer.name); | |
6100 | + $('#canvas').setLayer(layer.name, { | |
6101 | + handle: { | |
6102 | + type: 'rectangle', | |
6103 | + fillStyle: '#fff', | |
6104 | + strokeStyle: '#c33', | |
6105 | + strokeWidth: 2, | |
6106 | + width: 5, height: 5, | |
6107 | + cornerRadius: 3 | |
6108 | + } | |
6109 | + }).drawLayers(); | |
6155 | 6110 | |
6156 | - break; | |
6111 | + }, | |
6112 | + mouseout: function (layer) { | |
6113 | + $rootScope.canvasLayerNameCollection = []; | |
6114 | + $('#canvas').setLayer(layer.name, { | |
6115 | + handle: { | |
6116 | + type: 'rectangle', | |
6117 | + fillStyle: 'pink', | |
6118 | + strokeStyle: 'yellow', | |
6119 | + strokeWidth: 0, | |
6120 | + width: 0, height: 0, | |
6121 | + cornerRadius: 0 | |
6122 | + } | |
6157 | 6123 | |
6158 | - } | |
6124 | + }).drawLayers(); | |
6125 | + | |
6126 | + }, | |
6127 | + mouseover: function (layer) { | |
6128 | + | |
6129 | + $('#canvas').setLayer(layer.name, { | |
6130 | + handle: { | |
6131 | + type: 'rectangle', | |
6132 | + fillStyle: '#fff', | |
6133 | + strokeStyle: '#c33', | |
6134 | + strokeWidth: 2, | |
6135 | + width: 5, height: 5, | |
6136 | + cornerRadius: 3 | |
6137 | + } | |
6138 | + }).drawLayers(); | |
6139 | + | |
6140 | + } | |
6141 | + }); | |
6142 | + | |
6143 | + | |
6144 | + $("#annotationTextModal").modal("toggle"); | |
6145 | + $('.btnCursor').trigger('click'); | |
6146 | + $(".btn-annotation").removeClass("activebtncolor"); | |
6147 | + $('.btnCursor').addClass('activebtncolor'); | |
6148 | + break; | |
6149 | + | |
6150 | + case "DrawPolygon": | |
6151 | + | |
6152 | + break; | |
6153 | + | |
6154 | + } | |
6159 | 6155 | //} |
6160 | 6156 | |
6161 | 6157 | } |
... | ... | @@ -6182,7 +6178,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6182 | 6178 | $rootScope.textArea = $("#text_area").val(); |
6183 | 6179 | $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); |
6184 | 6180 | $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
6185 | - // alert($rootScope.fontColor); | |
6181 | + // alert($rootScope.fontColor); | |
6186 | 6182 | $('#canvas').drawText({ |
6187 | 6183 | layer: true, |
6188 | 6184 | draggable: true, |
... | ... | @@ -6218,11 +6214,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6218 | 6214 | groups: ['TextArea_' + $rootScope.resetText], |
6219 | 6215 | dragGroups: ['TextArea_' + $rootScope.resetText], |
6220 | 6216 | opacity: $rootScope.shapestyleOpacity, |
6221 | - // strokeStyle: 'black', | |
6222 | - // strokeWidth: 2, | |
6217 | + // strokeStyle: 'black', | |
6218 | + // strokeWidth: 2, | |
6223 | 6219 | strokeStyle: $rootScope.shapestyleborderColor, |
6224 | 6220 | strokeWidth: $rootScope.shapestyleborderWidth, |
6225 | - // fillStyle: $rootScope.shapestyleFillColor, | |
6221 | + // fillStyle: $rootScope.shapestyleFillColor, | |
6226 | 6222 | x: $scope.offsetX1, y: $scope.offsetY1, |
6227 | 6223 | width: $scope.x - $scope.offsetX1, |
6228 | 6224 | height: $scope.y - $scope.offsetY1, |
... | ... | @@ -6302,12 +6298,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6302 | 6298 | $rootScope.FreeStylePaint = function (e) { |
6303 | 6299 | // debugger; |
6304 | 6300 | |
6305 | - | |
6306 | - // $rootScope.shapeType = "FreeStylePaint"; | |
6301 | + | |
6302 | + // $rootScope.shapeType = "FreeStylePaint"; | |
6307 | 6303 | canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); |
6308 | 6304 | canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); |
6309 | - | |
6310 | - | |
6305 | + | |
6306 | + | |
6311 | 6307 | } |
6312 | 6308 | $scope.OnPaintBrushCanvasMouseDown = function (event) { |
6313 | 6309 | switch ($rootScope.shapeType) { |
... | ... | @@ -6334,40 +6330,40 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6334 | 6330 | } |
6335 | 6331 | } |
6336 | 6332 | $scope.OnPaintBrushCanvasMouseUp = function (event) { |
6337 | - | |
6338 | - | |
6339 | - // var canvasElement1 = document.getElementById("canvasPaint"); | |
6340 | - // var ctx1 = canvasElement1.getContext("2d"); | |
6341 | - | |
6333 | + | |
6334 | + | |
6335 | + // var canvasElement1 = document.getElementById("canvasPaint"); | |
6336 | + // var ctx1 = canvasElement1.getContext("2d"); | |
6337 | + | |
6342 | 6338 | //switch($rootScope.shapeType) |
6343 | 6339 | //{ |
6344 | 6340 | |
6345 | 6341 | // case "FreeStylePaint": |
6346 | 6342 | |
6347 | 6343 | // debugger; |
6348 | - | |
6344 | + | |
6349 | 6345 | // if ($("#amount-2").val() == '') |
6350 | 6346 | // { |
6351 | 6347 | // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); |
6352 | 6348 | // } |
6353 | 6349 | // else |
6354 | 6350 | // { |
6355 | - | |
6351 | + | |
6356 | 6352 | // var a = $("#amount-2").val(); |
6357 | 6353 | // $scope.shapesize = parseInt(a); |
6358 | 6354 | // alert(JSON.stringify({ defaultSize: $scope.shapesize })); |
6359 | 6355 | // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); |
6360 | 6356 | |
6361 | 6357 | // } |
6362 | - | |
6363 | - | |
6358 | + | |
6359 | + | |
6364 | 6360 | // break; |
6365 | - | |
6361 | + | |
6366 | 6362 | //} |
6367 | 6363 | |
6368 | 6364 | } |
6369 | 6365 | |
6370 | - | |
6366 | + | |
6371 | 6367 | |
6372 | 6368 | $(document).keydown(function (event) { |
6373 | 6369 | |
... | ... | @@ -6748,7 +6744,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6748 | 6744 | $rootScope.viewOrientationId = currentOpenViewId; |
6749 | 6745 | //confirm that this is DA module which is last open |
6750 | 6746 | if (currentOpenModuleId == 1) { |
6751 | - | |
6747 | + | |
6752 | 6748 | $('#termList').empty(); |
6753 | 6749 | $scope.loadListManger(); |
6754 | 6750 | |
... | ... | @@ -6939,8 +6935,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6939 | 6935 | |
6940 | 6936 | //8.remove current layer canavses |
6941 | 6937 | $scope.flushCanvas(); |
6942 | - | |
6943 | - | |
6938 | + | |
6939 | + | |
6944 | 6940 | |
6945 | 6941 | //9. |
6946 | 6942 | $timeout(function () { |
... | ... | @@ -6953,7 +6949,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6953 | 6949 | }, 500); |
6954 | 6950 | |
6955 | 6951 | |
6956 | - | |
6952 | + | |
6957 | 6953 | } |
6958 | 6954 | |
6959 | 6955 | $scope.getChildTermList = function (termNo) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -570,7 +570,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
570 | 570 | var openViewLen = $rootScope.openViews.length; |
571 | 571 | var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId; |
572 | 572 | $rootScope.isSettingEventAlredayDispachted = true; |
573 | - $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }); | |
573 | + $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId },true); | |
574 | 574 | } |
575 | 575 | else { |
576 | 576 | $rootScope.$broadcast('reloadDAControllerEvent', true); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -238,7 +238,7 @@ |
238 | 238 | |
239 | 239 | <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; "> |
240 | 240 | <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; "> |
241 | - <img id="navimg" src="{{navimgsrc}}" alt=""></img> | |
241 | + <img id="navimg" ng-src="{{navimgsrc}}" alt=""> | |
242 | 242 | <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition"> |
243 | 243 | </div> |
244 | 244 | </div> | ... | ... |