Commit 280181a9fd628beb5763c2efe3c5960a1e1f722d
Merge branch 'ExtractIssueFix' into Develop
Showing
2 changed files
with
341 additions
and
44 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1380,6 +1380,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1380 | 1380 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1381 | 1381 | $scope.MultiLanguageAnnationArray = []; |
1382 | 1382 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1383 | + | |
1383 | 1384 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1384 | 1385 | } |
1385 | 1386 | else { |
... | ... | @@ -1395,6 +1396,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1395 | 1396 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1396 | 1397 | $scope.MultiLanguageAnnationArray = []; |
1397 | 1398 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1399 | + | |
1400 | + | |
1398 | 1401 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1399 | 1402 | } |
1400 | 1403 | else { |
... | ... | @@ -1402,6 +1405,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1402 | 1405 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1403 | 1406 | $scope.MultiLanguageAnnationArray = []; |
1404 | 1407 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1408 | + | |
1409 | + | |
1405 | 1410 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1406 | 1411 | } |
1407 | 1412 | |
... | ... | @@ -1461,6 +1466,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1461 | 1466 | } |
1462 | 1467 | ); |
1463 | 1468 | |
1469 | + //-NIKI-for solving extarct issue 8286 | |
1470 | + | |
1471 | + var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR'); | |
1472 | + | |
1473 | + var width = imageCanvas.width; | |
1474 | + var ht = imageCanvas.height; | |
1475 | + | |
1476 | + var coloredCanvasContext = imageCanvas.getContext("2d"); | |
1477 | + var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht); | |
1478 | + var coloredImageDataVar = coloredImageData; | |
1479 | + | |
1480 | + $rootScope.coloredImageMRCanvasList[parseInt(bodyRegionId)] = coloredImageDataVar; | |
1481 | + | |
1482 | + | |
1483 | + | |
1484 | + // | |
1464 | 1485 | |
1465 | 1486 | // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) |
1466 | 1487 | |
... | ... | @@ -1717,6 +1738,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1717 | 1738 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1718 | 1739 | $scope.MultiLanguageAnnationArray = []; |
1719 | 1740 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1741 | + | |
1720 | 1742 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1721 | 1743 | } |
1722 | 1744 | else { |
... | ... | @@ -1752,6 +1774,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1752 | 1774 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1753 | 1775 | |
1754 | 1776 | console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); |
1777 | + | |
1755 | 1778 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1756 | 1779 | } |
1757 | 1780 | |
... | ... | @@ -1797,6 +1820,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1797 | 1820 | ); |
1798 | 1821 | |
1799 | 1822 | |
1823 | + //-NIKI-for solving extarct issue 8286 | |
1824 | + | |
1825 | + var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId); | |
1826 | + | |
1827 | + var width = imageCanvas.width; | |
1828 | + var ht = imageCanvas.height; | |
1829 | + | |
1830 | + var coloredCanvasContext = imageCanvas.getContext("2d"); | |
1831 | + var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht); | |
1832 | + var coloredImageDataVar = coloredImageData; | |
1833 | + | |
1834 | + | |
1835 | + $rootScope.coloredImageCanvasList[parseInt(bodyRegionId - 1)] = coloredImageDataVar; | |
1836 | + // | |
1837 | + | |
1800 | 1838 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
1801 | 1839 | |
1802 | 1840 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
... | ... | @@ -2016,8 +2054,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2016 | 2054 | |
2017 | 2055 | |
2018 | 2056 | grayCanvasContext.putImageData(updatedData, 0, 0); |
2019 | - | |
2020 | - | |
2057 | + | |
2058 | + | |
2021 | 2059 | //to resolve lateral arm black issue in highlight mode |
2022 | 2060 | |
2023 | 2061 | if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { |
... | ... | @@ -2761,8 +2799,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2761 | 2799 | $(".com").css("display", "none"); |
2762 | 2800 | $("#bord").css({ "width": "0px", "display": "none" }); |
2763 | 2801 | var sppechBubbleDotHTML = '<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' |
2764 | - + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;">' | |
2765 | - + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2802 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' | |
2803 | + + '<span style="position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;">' | |
2766 | 2804 | + '<img class="crossDiv_temp" src=' + $rootScope.path + '></span></div>' |
2767 | 2805 | |
2768 | 2806 | + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' |
... | ... | @@ -2903,7 +2941,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2903 | 2941 | var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length; |
2904 | 2942 | // alert(Exists_annotation); |
2905 | 2943 | // alert(pointClicked_annotation); |
2906 | - var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.j + "'></div><div data=" + $scope.j + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.j + " class='dynCross_anno' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord_annotation" + $scope.j + "'></div></div>"; | |
2944 | + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.j + "'></div><div data=" + $scope.j + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;'><img id=" + $scope.j + " class='dynCross_anno' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord_annotation" + $scope.j + "'></div></div>"; | |
2907 | 2945 | if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { |
2908 | 2946 | if (Exists_annotation == 0) { |
2909 | 2947 | $("#canvasDiv").append(sppechBubbleHTML_annotation); |
... | ... | @@ -3006,7 +3044,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3006 | 3044 | $("#" + sub_id_annotation).append("<p style='margin-bottom:2px;'>" + MultipleLang_annotation_T1 + "</p>"); |
3007 | 3045 | } |
3008 | 3046 | |
3009 | - $("#" + sub_id_annotation).append("<p style='border-bottom:1px solid black;margin-bottom:0;'></p>"); | |
3047 | + $("#" + sub_id_annotation).append("<p style='border-bottom:1px dotted white;margin-bottom:0;'></p>"); | |
3010 | 3048 | |
3011 | 3049 | for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) { |
3012 | 3050 | var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k]; |
... | ... | @@ -3129,8 +3167,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3129 | 3167 | $("#bord_annotation").css({ "width": "0px", "display": "none" }); |
3130 | 3168 | |
3131 | 3169 | var sppechBubbleDotHTML_annotation = '<div id="dot_annotation" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' |
3132 | - + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;">' | |
3133 | - + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
3170 | + + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;font-weight:bold;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' | |
3171 | + + '<span style="position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;">' | |
3134 | 3172 | + '<img class="crossDiv_temp_annotation" src=' + $rootScope.path + '></span></div>' |
3135 | 3173 | |
3136 | 3174 | + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord_annotation">' |
... | ... | @@ -3147,7 +3185,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3147 | 3185 | $("#sppeachBubble_annotation").append("<p style='margin-bottom:2px;'>" + MultipleLang_annotation_T1 + "</p>"); |
3148 | 3186 | } |
3149 | 3187 | |
3150 | - $("#sppeachBubble_annotation").append("<p style='border-bottom:1px solid black;margin-bottom:0;'></p>"); | |
3188 | + $("#sppeachBubble_annotation").append("<p style='border-bottom:1px dotted white;margin-bottom:0;'></p>"); | |
3151 | 3189 | |
3152 | 3190 | for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) { |
3153 | 3191 | var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k]; |
... | ... | @@ -3224,7 +3262,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3224 | 3262 | $("#sppeachBubble_annotation").append("<p style='margin-bottom:2px;'>" + MultipleLang_annotation_T1 + "</p>"); |
3225 | 3263 | } |
3226 | 3264 | |
3227 | - $("#sppeachBubble_annotation").append("<p style='border-bottom:1px solid black;margin-bottom:0;'></p>"); | |
3265 | + $("#sppeachBubble_annotation").append("<p style='border-bottom:1px dotted white;margin-bottom:0;'></p>"); | |
3228 | 3266 | |
3229 | 3267 | for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) { |
3230 | 3268 | var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k]; |
... | ... | @@ -3334,7 +3372,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3334 | 3372 | } |
3335 | 3373 | |
3336 | 3374 | $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { |
3337 | - var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>"; | |
3375 | + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>"; | |
3338 | 3376 | //Issue #7286 :Undefined annotation should not appear |
3339 | 3377 | for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { |
3340 | 3378 | var annotation = $scope.MultiLanguageAnnationArray[i]; |
... | ... | @@ -4404,7 +4442,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4404 | 4442 | $scope.annotationTextArrayT2 = []; |
4405 | 4443 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
4406 | 4444 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
4407 | - | |
4445 | + | |
4408 | 4446 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
4409 | 4447 | } |
4410 | 4448 | tempMaskImg.src = "http://localhost/AIAHtml/" + tranparencyMaskImgSrc; |
... | ... | @@ -4442,6 +4480,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4442 | 4480 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
4443 | 4481 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
4444 | 4482 | |
4483 | + | |
4445 | 4484 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
4446 | 4485 | } |
4447 | 4486 | else |
... | ... | @@ -4453,6 +4492,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4453 | 4492 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
4454 | 4493 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
4455 | 4494 | |
4495 | + | |
4456 | 4496 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
4457 | 4497 | |
4458 | 4498 | |
... | ... | @@ -5275,15 +5315,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5275 | 5315 | var coloredImageDataVar = coloredImageData; |
5276 | 5316 | |
5277 | 5317 | |
5278 | - if (value.haveMirror == 'true') { | |
5279 | - $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5280 | - } | |
5281 | - else { | |
5318 | + //if (value.haveMirror == 'true') { | |
5319 | + // $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5320 | + //} | |
5321 | + //else { | |
5282 | 5322 | |
5283 | 5323 | |
5284 | - $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5324 | + // $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5285 | 5325 | |
5286 | - } | |
5326 | + //} | |
5287 | 5327 | |
5288 | 5328 | |
5289 | 5329 | var context_gray = imageCanvas.getContext('2d'); |
... | ... | @@ -5482,14 +5522,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5482 | 5522 | var coloredImageDataVar = coloredImageData; |
5483 | 5523 | |
5484 | 5524 | |
5485 | - if (value.haveMirror == 'true') { | |
5486 | - $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5487 | - } | |
5488 | - else { | |
5525 | + //if (value.haveMirror == 'true') { | |
5526 | + // $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5527 | + //} | |
5528 | + //else { | |
5489 | 5529 | |
5490 | - $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5530 | + // $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5491 | 5531 | |
5492 | - } | |
5532 | + //} | |
5493 | 5533 | |
5494 | 5534 | |
5495 | 5535 | var context = imageCanvas.getContext('2d'); |
... | ... | @@ -6679,9 +6719,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6679 | 6719 | |
6680 | 6720 | $("#annotationTextModal").modal("toggle"); |
6681 | 6721 | $('.btnCursor').trigger('click'); |
6722 | + | |
6682 | 6723 | $("#text_area").val(''); |
6724 | + | |
6683 | 6725 | $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); |
6726 | + | |
6727 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
6728 | + | |
6729 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
6730 | + | |
6731 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
6732 | + | |
6733 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
6734 | + | |
6735 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
6736 | + | |
6737 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
6738 | + | |
6684 | 6739 | $(".btn-annotation").removeClass("activebtncolor"); |
6740 | + | |
6685 | 6741 | $('.btnCursor').addClass('activebtncolor'); |
6686 | 6742 | break; |
6687 | 6743 | |
... | ... | @@ -6740,7 +6796,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6740 | 6796 | groups: ['TextArea_' + $rootScope.resetText], |
6741 | 6797 | dragGroups: ['TextArea_' + $rootScope.resetText], |
6742 | 6798 | fillStyle: $rootScope.fontColor, |
6743 | - fontStyle: $rootScope.fontStyle, | |
6799 | + fontStyle: $rootScope.fontWeight + " " + $rootScope.fontStyle, | |
6744 | 6800 | fontSize: $rootScope.fontSizes, |
6745 | 6801 | fontFamily: $rootScope.fontFamily, |
6746 | 6802 | align: $rootScope.textAlignmt, |
... | ... | @@ -6751,7 +6807,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6751 | 6807 | maxHeight: $scope.y - $scope.offsetY1, |
6752 | 6808 | add: function (layer) { |
6753 | 6809 | $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' }); |
6754 | - $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily }); | |
6810 | + $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily, TextDecoration: $rootScope.underlineText }); | |
6755 | 6811 | } |
6756 | 6812 | }) |
6757 | 6813 | // Draw rectangle |
... | ... | @@ -6797,19 +6853,119 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6797 | 6853 | $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated }); |
6798 | 6854 | $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); |
6799 | 6855 | var _rectLayerOnSaveSplitInt; |
6800 | - if (_rectLayerOnSaveSplit[1] >= 3) | |
6801 | - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2); | |
6802 | - else | |
6803 | - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
6856 | + //if (_rectLayerOnSaveSplit[1] >= 3) | |
6857 | + // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2); | |
6858 | + //else | |
6859 | + // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
6860 | + | |
6861 | + _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
6804 | 6862 | var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1; |
6805 | 6863 | $("#text_area").val(b); |
6864 | + var fontStyleProp = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle; | |
6865 | + var fontWeightProp = fontStyleProp.split(" "); | |
6866 | + | |
6806 | 6867 | $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize); |
6807 | - $("#text_area").css("font-weight", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); | |
6808 | - $("#text_area").css("font-style", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); | |
6868 | + $("#text_area").css("font-weight", fontWeightProp[0]); | |
6869 | + $("#text_area").css("font-style", fontWeightProp[1]); | |
6809 | 6870 | $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align); |
6810 | 6871 | $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor); |
6811 | 6872 | $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily); |
6812 | - $("#text_area").css("text-decoration", $rootScope.underlineText); | |
6873 | + $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration); | |
6874 | + | |
6875 | + | |
6876 | + | |
6877 | + | |
6878 | + //adding text text decoration active class in text edit pop-up | |
6879 | + | |
6880 | + if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration == "underline") { | |
6881 | + | |
6882 | + $("#text-underline").addClass("ActiveFormattingButtonClass"); | |
6883 | + | |
6884 | + } | |
6885 | + | |
6886 | + else { | |
6887 | + | |
6888 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
6889 | + | |
6890 | + } | |
6891 | + | |
6892 | + | |
6893 | + | |
6894 | + //adding text font weight active class in text edit pop-up | |
6895 | + | |
6896 | + if (fontWeightProp[0] == 700) { | |
6897 | + | |
6898 | + | |
6899 | + | |
6900 | + $("#text-bold").addClass("ActiveFormattingButtonClass"); | |
6901 | + | |
6902 | + } | |
6903 | + | |
6904 | + else | |
6905 | + | |
6906 | + { | |
6907 | + | |
6908 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
6909 | + | |
6910 | + } | |
6911 | + | |
6912 | + //adding text font style active class in text edit pop-up | |
6913 | + | |
6914 | + if (fontWeightProp[1] == "italic") { | |
6915 | + | |
6916 | + | |
6917 | + $("#text-italic").addClass("ActiveFormattingButtonClass"); | |
6918 | + } | |
6919 | + else | |
6920 | + | |
6921 | + { | |
6922 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
6923 | + | |
6924 | + | |
6925 | + | |
6926 | + } | |
6927 | + | |
6928 | + | |
6929 | + | |
6930 | + //adding text alignment active class in text edit pop-up | |
6931 | + | |
6932 | + if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "left") { | |
6933 | + | |
6934 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
6935 | + | |
6936 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
6937 | + | |
6938 | + $("#text-left").addClass("ActiveFormattingButtonClass"); | |
6939 | + | |
6940 | + } | |
6941 | + | |
6942 | + else if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "right") { | |
6943 | + | |
6944 | + | |
6945 | + | |
6946 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
6947 | + | |
6948 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
6949 | + | |
6950 | + $("#text-right").addClass("ActiveFormattingButtonClass"); | |
6951 | + | |
6952 | + | |
6953 | + | |
6954 | + } | |
6955 | + | |
6956 | + else if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "center") { | |
6957 | + | |
6958 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
6959 | + | |
6960 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
6961 | + | |
6962 | + $("#text-center").addClass("ActiveFormattingButtonClass"); | |
6963 | + | |
6964 | + | |
6965 | + | |
6966 | + } | |
6967 | + | |
6968 | + | |
6813 | 6969 | _rectLayerOnSaveSplitInt = ''; b = ''; |
6814 | 6970 | $("#annotationTextModal").modal("toggle"); |
6815 | 6971 | }, |
... | ... | @@ -6843,6 +6999,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6843 | 6999 | $("#text_area").val(''); |
6844 | 7000 | $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); |
6845 | 7001 | |
7002 | + | |
7003 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
7004 | + | |
7005 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
7006 | + | |
7007 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
7008 | + | |
7009 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7010 | + | |
7011 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7012 | + | |
7013 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
7014 | + | |
7015 | + | |
6846 | 7016 | } |
6847 | 7017 | |
6848 | 7018 | // this part will work second time when save button will be clicked |
... | ... | @@ -6871,7 +7041,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6871 | 7041 | groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], |
6872 | 7042 | dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], |
6873 | 7043 | fillStyle: _modifiedFontColor, |
6874 | - fontStyle: _modifiedFontStyle, | |
7044 | + fontStyle: _modifiedFontWeight + " " + _modifiedFontStyle, | |
6875 | 7045 | fontSize: _modifiedFontSize, |
6876 | 7046 | fontFamily: _modifiedFontFamily, |
6877 | 7047 | align: _modifiedTextAlign, |
... | ... | @@ -6933,6 +7103,62 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6933 | 7103 | $("#text_area").css("color", _modifiedFontColor); |
6934 | 7104 | $("#text_area").css("font-family", _modifiedFontFamily); |
6935 | 7105 | $("#text_area").css("text-decoration", _modifiedFontDecoration); |
7106 | + | |
7107 | + | |
7108 | + | |
7109 | + //adding text text decoration active class in text edit pop-up | |
7110 | + if (_modifiedFontDecoration == "underline") { | |
7111 | + $("#text-underline").addClass("ActiveFormattingButtonClass"); | |
7112 | + } | |
7113 | + else { | |
7114 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
7115 | + } | |
7116 | + | |
7117 | + //adding text font weight active class in text edit pop-up | |
7118 | + if (_modifiedFontWeight == 700) { | |
7119 | + | |
7120 | + $("#text-bold").addClass("ActiveFormattingButtonClass"); | |
7121 | + } | |
7122 | + else { | |
7123 | + | |
7124 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
7125 | + | |
7126 | + } | |
7127 | + | |
7128 | + //adding text font style active class in text edit pop-up | |
7129 | + if (_modifiedFontStyle == "italic") { | |
7130 | + | |
7131 | + $("#text-italic").addClass("ActiveFormattingButtonClass"); | |
7132 | + } | |
7133 | + else { | |
7134 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
7135 | + | |
7136 | + } | |
7137 | + | |
7138 | + //adding text alignment active class in text edit pop-up | |
7139 | + if (_modifiedTextAlign == "left") { | |
7140 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7141 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
7142 | + $("#text-left").addClass("ActiveFormattingButtonClass"); | |
7143 | + } | |
7144 | + else if (_modifiedTextAlign == "right") { | |
7145 | + | |
7146 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
7147 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7148 | + $("#text-right").addClass("ActiveFormattingButtonClass"); | |
7149 | + | |
7150 | + } | |
7151 | + else if (_modifiedTextAlign == "center") { | |
7152 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7153 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7154 | + $("#text-center").addClass("ActiveFormattingButtonClass"); | |
7155 | + | |
7156 | + } | |
7157 | + | |
7158 | + | |
7159 | + | |
7160 | + | |
7161 | + | |
6936 | 7162 | $("#annotationTextModal").modal("toggle"); |
6937 | 7163 | }, |
6938 | 7164 | mouseout: function (layer) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -41,6 +41,35 @@ |
41 | 41 | |
42 | 42 | <!--Annotation Toolbar: Jcanvas--> |
43 | 43 | <style> |
44 | + | |
45 | + | |
46 | + .ActiveFormattingButtonClass { | |
47 | + background-color: #1B92D0 !important; | |
48 | + } | |
49 | + | |
50 | + .Edittext-btn-css { | |
51 | + background: #4B4B4B; | |
52 | + padding: 4px; | |
53 | + cursor: pointer; | |
54 | + margin-right: 2px; | |
55 | + } | |
56 | + | |
57 | + /*.italic-btn-css { | |
58 | + background: #4B4B4B; | |
59 | + padding: 4px; | |
60 | + cursor: pointer; | |
61 | + margin-right: 2px; | |
62 | + }*/ | |
63 | + | |
64 | + .underline-btn-css { | |
65 | + background: #4B4B4B; | |
66 | + padding: 4px; | |
67 | + cursor: pointer; | |
68 | + margin-right: 5px; | |
69 | + } | |
70 | + | |
71 | + | |
72 | + | |
44 | 73 | .activebtncolor { |
45 | 74 | background-color: #1B92D0 !important; |
46 | 75 | border-color: #1B92D0 !important; |
... | ... | @@ -537,14 +566,14 @@ |
537 | 566 | <option>72</option> |
538 | 567 | </select> |
539 | 568 | <span style="vertical-align:middle;"> |
540 | - <span id="text-bold" style="background: #4B4B4B;padding:4px;cursor:pointer;margin-right:2px;"> | |
569 | + <span id="text-bold" class="Edittext-btn-css"> | |
541 | 570 | <i aria-hidden="true" class="fa fa-bold" style="color: #fff"></i> |
542 | 571 | </span> |
543 | - <span id="text-italic" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 2px;"> | |
572 | + <span id="text-italic" class="Edittext-btn-css"> | |
544 | 573 | <i class="fa fa-italic" aria-hidden="true" style="color: #fff"></i> |
545 | 574 | |
546 | 575 | </span> |
547 | - <span id="text-underline" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 5px;"> | |
576 | + <span id="text-underline" class="underline-btn-css"> | |
548 | 577 | <i class="fa fa-underline" aria-hidden="true" style="color: #fff"></i> |
549 | 578 | </span> |
550 | 579 | </span> |
... | ... | @@ -555,15 +584,15 @@ |
555 | 584 | </div> |
556 | 585 | |
557 | 586 | <span style="vertical-align:middle;"> |
558 | - <span id="text-left" style="background: #4B4B4B;padding:4px;cursor:pointer;margin-right:2px;"> | |
587 | + <span id="text-left" class="Edittext-btn-css"> | |
559 | 588 | <i aria-hidden="true" class="fa fa-align-left" style="color: #fff"></i> |
560 | 589 | </span> |
561 | - <span id="text-center" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 2px;"> | |
590 | + <span id="text-center" class="Edittext-btn-css"> | |
562 | 591 | <i class="fa fa-align-center" aria-hidden="true" style="color: #fff"></i> |
563 | 592 | |
564 | 593 | |
565 | 594 | </span> |
566 | - <span id="text-right" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 5px;"> | |
595 | + <span id="text-right" class="underline-btn-css"> | |
567 | 596 | <i class="fa fa-align-right" aria-hidden="true" style="color: #fff"></i> |
568 | 597 | |
569 | 598 | |
... | ... | @@ -1207,41 +1236,83 @@ |
1207 | 1236 | |
1208 | 1237 | $("#text-left").on('click', function () { |
1209 | 1238 | |
1239 | + //Annotation: Formatting buttons color is not change when select. | |
1240 | + | |
1241 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
1242 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
1243 | + $("#text-left").addClass("ActiveFormattingButtonClass"); | |
1210 | 1244 | $("#text_area").css("text-align", "left"); |
1211 | 1245 | |
1246 | + | |
1212 | 1247 | }); |
1213 | 1248 | |
1214 | 1249 | |
1215 | 1250 | $("#text-center").on('click', function () { |
1216 | 1251 | |
1252 | + //Annotation: Formatting buttons color is not change when select. | |
1253 | + | |
1254 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
1255 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
1256 | + $("#text-center").addClass("ActiveFormattingButtonClass"); | |
1217 | 1257 | $("#text_area").css("text-align", "center"); |
1218 | 1258 | |
1259 | + | |
1219 | 1260 | }); |
1220 | 1261 | |
1221 | 1262 | |
1222 | 1263 | $("#text-right").on('click', function () { |
1223 | 1264 | |
1224 | - $("#text_area").css("text-align", "right"); | |
1265 | + //Annotation: Formatting buttons color is not change when select. | |
1225 | 1266 | |
1267 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
1268 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
1269 | + $("#text-right").addClass("ActiveFormattingButtonClass"); | |
1270 | + $("#text_area").css("text-align", "right"); | |
1226 | 1271 | }); |
1227 | 1272 | |
1228 | 1273 | |
1229 | 1274 | $("#text-bold").on('click', function () { |
1230 | 1275 | |
1231 | - $("#text_area").css("font-weight", "bold"); | |
1276 | + //Annotation: Formatting buttons color is not change when select. | |
1277 | + $("#text-bold").toggleClass("ActiveFormattingButtonClass"); | |
1278 | + | |
1279 | + if ($("#text-bold").hasClass("ActiveFormattingButtonClass")) { | |
1280 | + $("#text_area").css("font-weight", "bold"); | |
1281 | + } | |
1282 | + else { | |
1283 | + $("#text_area").css("font-weight", "normal"); | |
1284 | + } | |
1285 | + | |
1232 | 1286 | |
1233 | 1287 | }); |
1234 | 1288 | |
1235 | 1289 | $("#text-italic").on('click', function () { |
1236 | 1290 | |
1237 | - $("#text_area").css("font-style", "italic"); | |
1291 | + //Annotation: Formatting buttons color is not change when select. | |
1292 | + $("#text-italic").toggleClass("ActiveFormattingButtonClass"); | |
1293 | + if ($("#text-italic").hasClass("ActiveFormattingButtonClass")) { | |
1294 | + $("#text_area").css("font-style", "italic"); | |
1295 | + } | |
1296 | + else { | |
1297 | + $("#text_area").css("font-style", "normal"); | |
1298 | + } | |
1299 | + | |
1238 | 1300 | |
1239 | 1301 | }); |
1240 | 1302 | |
1241 | 1303 | $("#text-underline").on('click', function () { |
1242 | 1304 | |
1243 | - $("#text_area").css("text-decoration", "underline"); | |
1305 | + //Annotation: Formatting buttons color is not change when select. | |
1306 | + $("#text-underline").toggleClass("ActiveFormattingButtonClass"); | |
1307 | + | |
1308 | + if ($("#text-underline").hasClass("ActiveFormattingButtonClass")) { | |
1309 | + $("#text_area").css("text-decoration", "underline"); | |
1310 | + } | |
1311 | + else { | |
1312 | + $("#text_area").css("text-decoration", "none"); | |
1313 | + } | |
1244 | 1314 | |
1315 | + | |
1245 | 1316 | }); |
1246 | 1317 | |
1247 | 1318 | ... | ... |