Commit b7d68d868551e29f722a38ecc2b88835d0213785
1 parent
8f865224
Modesty Setting
Showing
2 changed files
with
301 additions
and
108 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -34,6 +34,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -34,6 +34,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
34 | $scope.bagartDetails; | 34 | $scope.bagartDetails; |
35 | $scope.transNumber = 50; | 35 | $scope.transNumber = 50; |
36 | 36 | ||
37 | + $rootScope.modestyCanvasZindex = 12100; | ||
38 | + $rootScope.isModestyCanvasVisible = false; | ||
37 | //for transarency scale | 39 | //for transarency scale |
38 | $scope.TBDrawStartX; | 40 | $scope.TBDrawStartX; |
39 | $scope.TBDrawStartY; | 41 | $scope.TBDrawStartY; |
@@ -731,7 +733,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -731,7 +733,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
731 | 733 | ||
732 | //set max for LayerNumber input | 734 | //set max for LayerNumber input |
733 | $rootScope.totalLayers = dataLength - 1; | 735 | $rootScope.totalLayers = dataLength - 1; |
734 | - // debugger | 736 | + |
735 | $('#txtLayerNumber').attr('max', $rootScope.totalLayers); | 737 | $('#txtLayerNumber').attr('max', $rootScope.totalLayers); |
736 | $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); | 738 | $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); |
737 | 739 | ||
@@ -1548,7 +1550,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1548,7 +1550,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1548 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); | 1550 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1549 | $scope.MultiLanguageAnnationArray = []; | 1551 | $scope.MultiLanguageAnnationArray = []; |
1550 | $scope.MultiLanguageAnnationArray.push(annotationText); | 1552 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1551 | - | 1553 | + |
1552 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | 1554 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1553 | } | 1555 | } |
1554 | else { | 1556 | else { |
@@ -1574,7 +1576,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1574,7 +1576,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1574 | $scope.MultiLanguageAnnationArray = []; | 1576 | $scope.MultiLanguageAnnationArray = []; |
1575 | $scope.MultiLanguageAnnationArray.push(annotationText); | 1577 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1576 | 1578 | ||
1577 | - | 1579 | + |
1578 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | 1580 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1579 | } | 1581 | } |
1580 | 1582 | ||
@@ -2785,7 +2787,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2785,7 +2787,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2785 | return null; | 2787 | return null; |
2786 | } | 2788 | } |
2787 | } | 2789 | } |
2788 | - | 2790 | + |
2789 | 2791 | ||
2790 | //layer change function | 2792 | //layer change function |
2791 | $scope.LayerChange = function () { | 2793 | $scope.LayerChange = function () { |
@@ -2795,7 +2797,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2795,7 +2797,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2795 | // $rootScope.isListManagerSelected = false; | 2797 | // $rootScope.isListManagerSelected = false; |
2796 | 2798 | ||
2797 | $rootScope.CloseListManager(); | 2799 | $rootScope.CloseListManager(); |
2798 | - | ||
2799 | $scope.isLayerChange = true; | 2800 | $scope.isLayerChange = true; |
2800 | $rootScope.isLoading = true; | 2801 | $rootScope.isLoading = true; |
2801 | $('#spinner').css('visibility', 'visible'); | 2802 | $('#spinner').css('visibility', 'visible'); |
@@ -2937,17 +2938,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2937,17 +2938,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2937 | $('#sppeachBubble').remove(); | 2938 | $('#sppeachBubble').remove(); |
2938 | $(".com").remove(); | 2939 | $(".com").remove(); |
2939 | $("#bord").remove(); | 2940 | $("#bord").remove(); |
2940 | - | ||
2941 | - | ||
2942 | - if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")){ | 2941 | + |
2942 | + if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")) { | ||
2943 | if ($rootScope.isAnnotatiomToolBarPopupActive == false) { | 2943 | if ($rootScope.isAnnotatiomToolBarPopupActive == false) { |
2944 | - | ||
2945 | - if ($("#transparencyScale").css("display") == "block") { | 2944 | + if ($("#transparencyScale").css("display") == "block") { |
2946 | $rootScope.switchToTransparencycanvas(); | 2945 | $rootScope.switchToTransparencycanvas(); |
2947 | } | 2946 | } |
2948 | } | 2947 | } |
2949 | else { | 2948 | else { |
2950 | - | ||
2951 | if ($("#OnIdentify").hasClass("annotationtoolbartab")) { | 2949 | if ($("#OnIdentify").hasClass("annotationtoolbartab")) { |
2952 | $rootScope.switchToTransparencycanvas(); | 2950 | $rootScope.switchToTransparencycanvas(); |
2953 | } | 2951 | } |
@@ -2956,14 +2954,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2956,14 +2954,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2956 | $rootScope.switchCanvas(); | 2954 | $rootScope.switchCanvas(); |
2957 | } | 2955 | } |
2958 | } | 2956 | } |
2959 | - | ||
2960 | } | 2957 | } |
2961 | else | 2958 | else |
2962 | { | 2959 | { |
2963 | if ($rootScope.isAnnotatiomToolBarPopupActive == true) { | 2960 | if ($rootScope.isAnnotatiomToolBarPopupActive == true) { |
2964 | - | ||
2965 | $rootScope.CloseAnnotationTool(); | 2961 | $rootScope.CloseAnnotationTool(); |
2966 | - | ||
2967 | } | 2962 | } |
2968 | } | 2963 | } |
2969 | } | 2964 | } |
@@ -2973,15 +2968,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2973,15 +2968,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2973 | 2968 | ||
2974 | $scope.DisableProgressBar = function () { | 2969 | $scope.DisableProgressBar = function () { |
2975 | 2970 | ||
2976 | - // alert('Disabled wait cursor is called'); | ||
2977 | - | ||
2978 | 2971 | ||
2979 | if ($rootScope.isHighLight) { | 2972 | if ($rootScope.isHighLight) { |
2980 | - //alert('isHighlight: ' + $scope.isHighLight); | ||
2981 | - | ||
2982 | - //$('#btnHighLight').removeClass('btn btn-black'); | ||
2983 | - //$('#btnHighLight').addClass('btn-primary'); | ||
2984 | - | 2973 | + |
2985 | $("#btnHighLight").addClass("btn-primary"); | 2974 | $("#btnHighLight").addClass("btn-primary"); |
2986 | $("#btnHighLight").removeClass("btn-black"); | 2975 | $("#btnHighLight").removeClass("btn-black"); |
2987 | 2976 | ||
@@ -3043,7 +3032,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3043,7 +3032,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3043 | 3032 | ||
3044 | $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) { | 3033 | $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) { |
3045 | 3034 | ||
3046 | - //debugger; | 3035 | + |
3047 | if (isAnnotationForTBox == true) { | 3036 | if (isAnnotationForTBox == true) { |
3048 | //1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that | 3037 | //1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that |
3049 | // we decide the size of speech bubble | 3038 | // we decide the size of speech bubble |
@@ -3281,7 +3270,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3281,7 +3270,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3281 | var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length; | 3270 | var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length; |
3282 | // alert(Exists_annotation); | 3271 | // alert(Exists_annotation); |
3283 | // alert(pointClicked_annotation); | 3272 | // alert(pointClicked_annotation); |
3284 | - 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:60000;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:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.j + " class='dynCross_anno' style='width:18px' 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>"; | 3273 | + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div style='z-index:59000;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:60000;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:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.j + " class='dynCross_anno' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + $scope.j + "'></div></div>"; |
3285 | if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { | 3274 | if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { |
3286 | if (Exists_annotation == 0) { | 3275 | if (Exists_annotation == 0) { |
3287 | $("#canvasDiv").append(sppechBubbleHTML_annotation); | 3276 | $("#canvasDiv").append(sppechBubbleHTML_annotation); |
@@ -3506,12 +3495,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3506,12 +3495,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3506 | $(".com_annotation").css("display", "none"); | 3495 | $(".com_annotation").css("display", "none"); |
3507 | $("#bord_annotation").css({ "width": "0px", "display": "none" }); | 3496 | $("#bord_annotation").css({ "width": "0px", "display": "none" }); |
3508 | $('.dynCross_anno').parent().parent().parent().remove(); | 3497 | $('.dynCross_anno').parent().parent().parent().remove(); |
3509 | - 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>' | 3498 | + var sppechBubbleDotHTML_annotation = '<div id="dot_annotation" style="position:absolute;height:15px;width:35px;display:none;z-index:59000;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>' |
3510 | + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:60000;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;">' | 3499 | + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:60000;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;">' |
3511 | + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">' | 3500 | + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">' |
3512 | + '<img class="crossDiv_temp_annotation" style="width:18px" src=' + $rootScope.path + '></span></div>' | 3501 | + '<img class="crossDiv_temp_annotation" style="width:18px" src=' + $rootScope.path + '></span></div>' |
3513 | 3502 | ||
3514 | - + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord_annotation">' | 3503 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:59000;" id="bord_annotation">' |
3515 | + '</div>'; | 3504 | + '</div>'; |
3516 | 3505 | ||
3517 | 3506 | ||
@@ -3962,6 +3951,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3962,6 +3951,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3962 | } | 3951 | } |
3963 | 3952 | ||
3964 | function mouseDownListener(e) { | 3953 | function mouseDownListener(e) { |
3954 | + | ||
3965 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. | 3955 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
3966 | var tCanvas = document.getElementById('transparencyCanvas'); | 3956 | var tCanvas = document.getElementById('transparencyCanvas'); |
3967 | if ($('#transparencyScale').css("visibility") == 'visible') { | 3957 | if ($('#transparencyScale').css("visibility") == 'visible') { |
@@ -4237,18 +4227,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4237,18 +4227,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4237 | $("#annotationpainteraser").removeClass("activebtncolor"); | 4227 | $("#annotationpainteraser").removeClass("activebtncolor"); |
4238 | if ($("#DrawMode").hasClass("annotationtoolbartab")) | 4228 | if ($("#DrawMode").hasClass("annotationtoolbartab")) |
4239 | { | 4229 | { |
4240 | - var drawCanvasZindex = $("#canvas").css("z-index"); | ||
4241 | - var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
4242 | - drawCanvasZindex = parseInt(drawCanvasZindex) - 1; | ||
4243 | - paintCanvasZindex = parseInt(paintCanvasZindex) - 1; | ||
4244 | - if (drawCanvasZindex > paintCanvasZindex) { | ||
4245 | - $(".ui-wrapper").css("z-index", drawCanvasZindex); | ||
4246 | - $rootScope.UIWrapperZIndex = drawCanvasZindex; | 4230 | + if ($rootScope.isModestyCanvasVisible == true) { |
4231 | + | ||
4232 | + $rootScope.switchCanvas(); | ||
4233 | + | ||
4247 | } | 4234 | } |
4248 | else { | 4235 | else { |
4249 | - $(".ui-wrapper").css("z-index", paintCanvasZindex); | ||
4250 | - $rootScope.UIWrapperZIndex = paintCanvasZindex; | 4236 | + var drawCanvasZindex = $("#canvas").css("z-index"); |
4237 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
4238 | + drawCanvasZindex = parseInt(drawCanvasZindex) - 1; | ||
4239 | + paintCanvasZindex = parseInt(paintCanvasZindex) - 1; | ||
4240 | + if (drawCanvasZindex > paintCanvasZindex) { | ||
4241 | + $(".ui-wrapper").css("z-index", drawCanvasZindex); | ||
4242 | + $rootScope.UIWrapperZIndex = drawCanvasZindex; | ||
4243 | + } | ||
4244 | + else { | ||
4245 | + $(".ui-wrapper").css("z-index", paintCanvasZindex); | ||
4246 | + $rootScope.UIWrapperZIndex = paintCanvasZindex; | ||
4247 | + } | ||
4251 | } | 4248 | } |
4249 | + | ||
4252 | } | 4250 | } |
4253 | else { | 4251 | else { |
4254 | $rootScope.switchToTransparencycanvas(); | 4252 | $rootScope.switchToTransparencycanvas(); |
@@ -4458,6 +4456,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4458,6 +4456,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4458 | } | 4456 | } |
4459 | 4457 | ||
4460 | if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) { | 4458 | if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) { |
4459 | + $rootScope.isModestyCanvasVisible = true; | ||
4461 | var canvasModesty = document.createElement('canvas'); | 4460 | var canvasModesty = document.createElement('canvas'); |
4462 | canvasModesty.id = modestyTransCanvasId; | 4461 | canvasModesty.id = modestyTransCanvasId; |
4463 | canvasModesty.height = Height; | 4462 | canvasModesty.height = Height; |
@@ -4466,7 +4465,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4466,7 +4465,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4466 | canvasModesty.style.left = X + 'px'; | 4465 | canvasModesty.style.left = X + 'px'; |
4467 | canvasModesty.style.top = Y + 'px'; | 4466 | canvasModesty.style.top = Y + 'px'; |
4468 | canvasModesty.style.visibility = 'visible'; | 4467 | canvasModesty.style.visibility = 'visible'; |
4469 | - canvasModesty.style.zIndex = '2000'; | 4468 | + canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex; |
4470 | canvasModesty.addEventListener('click', OnClickModestyTransCanvas); | 4469 | canvasModesty.addEventListener('click', OnClickModestyTransCanvas); |
4471 | 4470 | ||
4472 | document.getElementById('canvasDiv').appendChild(canvasModesty); | 4471 | document.getElementById('canvasDiv').appendChild(canvasModesty); |
@@ -5389,8 +5388,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5389,8 +5388,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5389 | $scope.annotationTextArrayT2 = []; | 5388 | $scope.annotationTextArrayT2 = []; |
5390 | $scope.annotationTextArrayT1.push(annotations.annotationT1); | 5389 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
5391 | $scope.annotationTextArrayT2.push(annotations.annotationT2); | 5390 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
5392 | - | ||
5393 | - | 5391 | + |
5394 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); | 5392 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
5395 | } | 5393 | } |
5396 | else | 5394 | else |
@@ -5402,7 +5400,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5402,7 +5400,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5402 | $scope.annotationTextArrayT1.push(annotations.annotationT1); | 5400 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
5403 | $scope.annotationTextArrayT2.push(annotations.annotationT2); | 5401 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
5404 | 5402 | ||
5405 | - | ||
5406 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); | 5403 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
5407 | } | 5404 | } |
5408 | 5405 | ||
@@ -5487,8 +5484,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5487,8 +5484,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5487 | if ($('#speechBubbleTrns').length > 0) { | 5484 | if ($('#speechBubbleTrns').length > 0) { |
5488 | $('#speechBubbleTrns').remove(); | 5485 | $('#speechBubbleTrns').remove(); |
5489 | } | 5486 | } |
5487 | + | ||
5488 | + var t = $(".ui-wrapper").css("top"); | ||
5489 | + var e = t.split("p"); | ||
5490 | + var a = $(".ui-wrapper").css("height"); | ||
5491 | + var b = a.split("p"); | ||
5492 | + var c = parseInt(e[0]) + parseInt(b[0]); | ||
5493 | + | ||
5494 | + | ||
5495 | + var tCanvasTopPos = $(".ui-wrapper").css("top"); | ||
5496 | + var tCanvasTopPosAftrSplit = tCanvasTopPos.split("p"); | ||
5497 | + var tCanvasHeight = $(".ui-wrapper").css("height"); | ||
5498 | + var tCanvasHeightAftrSplit = tCanvasHeight.split("p"); | ||
5499 | + var tCanvasAttr = parseInt(tCanvasTopPosAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]); | ||
5500 | + | ||
5501 | + | ||
5502 | + if ((evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top) >= parseInt(tCanvasTopPosAftrSplit[0]) && (evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top) < tCanvasAttr) { | ||
5503 | + | ||
5490 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); | 5504 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
5491 | 5505 | ||
5506 | + } | ||
5507 | + else { | ||
5508 | + | ||
5509 | + $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(event); | ||
5510 | + | ||
5511 | + } | ||
5512 | + | ||
5492 | 5513 | ||
5493 | } | 5514 | } |
5494 | 5515 | ||
@@ -5533,7 +5554,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5533,7 +5554,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5533 | $scope.annotationTextArrayT2 = []; | 5554 | $scope.annotationTextArrayT2 = []; |
5534 | $scope.annotationTextArrayT1.push(annotations.annotationT1); | 5555 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
5535 | $scope.annotationTextArrayT2.push(annotations.annotationT2); | 5556 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
5536 | - | 5557 | + |
5537 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); | 5558 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
5538 | } | 5559 | } |
5539 | else | 5560 | else |
@@ -5542,7 +5563,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5542,7 +5563,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5542 | $scope.annotationTextArrayT2 = []; | 5563 | $scope.annotationTextArrayT2 = []; |
5543 | $scope.annotationTextArrayT1.push(annotations.annotationT1); | 5564 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
5544 | $scope.annotationTextArrayT2.push(annotations.annotationT2); | 5565 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
5545 | - | 5566 | + |
5546 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); | 5567 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
5547 | } | 5568 | } |
5548 | } | 5569 | } |
@@ -5641,8 +5662,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5641,8 +5662,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5641 | 5662 | ||
5642 | 5663 | ||
5643 | $scope.onTransparencyChange = function (ev, ui) { | 5664 | $scope.onTransparencyChange = function (ev, ui) { |
5644 | - //debugger; | ||
5645 | - // alert('t change') | 5665 | + |
5646 | $scope.transNumber = ui.value; | 5666 | $scope.transNumber = ui.value; |
5647 | 5667 | ||
5648 | var tCanvas = document.getElementById('transparencyCanvas'); | 5668 | var tCanvas = document.getElementById('transparencyCanvas'); |
@@ -5700,7 +5720,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5700,7 +5720,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5700 | } | 5720 | } |
5701 | 5721 | ||
5702 | $scope.CloseTransparencyBox = function () { | 5722 | $scope.CloseTransparencyBox = function () { |
5703 | - | 5723 | + $rootScope.isModestyCanvasVisible = false; |
5704 | //for enabling annoataions. | 5724 | //for enabling annoataions. |
5705 | //Now everything si done on canavases uswed in annotation toolbar. | 5725 | //Now everything si done on canavases uswed in annotation toolbar. |
5706 | 5726 | ||
@@ -8418,8 +8438,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -8418,8 +8438,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
8418 | .from($scope.VocabTermTxt) | 8438 | .from($scope.VocabTermTxt) |
8419 | .where('_TermText == ' + $scope.searchFilter) | 8439 | .where('_TermText == ' + $scope.searchFilter) |
8420 | .select('_ActualTermNumber', '_TermText', '_cdId'); | 8440 | .select('_ActualTermNumber', '_TermText', '_cdId'); |
8421 | - | 8441 | + |
8422 | if (EnteredDASearchTerm.length > 0) { | 8442 | if (EnteredDASearchTerm.length > 0) { |
8443 | + | ||
8423 | $scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber); | 8444 | $scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber); |
8424 | 8445 | ||
8425 | $scope.IsSearchVisible = false; | 8446 | $scope.IsSearchVisible = false; |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -465,7 +465,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -465,7 +465,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
465 | 465 | ||
466 | 466 | ||
467 | $rootScope.openParent = function (slug) { | 467 | $rootScope.openParent = function (slug) { |
468 | - // debugger; | 468 | + |
469 | var openViews = $rootScope.openViews; | 469 | var openViews = $rootScope.openViews; |
470 | if (openViews.length > 0) { | 470 | if (openViews.length > 0) { |
471 | $rootScope.openViews.splice(openViews.length - 1); | 471 | $rootScope.openViews.splice(openViews.length - 1); |
@@ -640,21 +640,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -640,21 +640,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
640 | $rootScope.CIAnotationIdentifyModeOff = false; | 640 | $rootScope.CIAnotationIdentifyModeOff = false; |
641 | $rootScope.OnIdentifyClick = function () { | 641 | $rootScope.OnIdentifyClick = function () { |
642 | 642 | ||
643 | - | 643 | + |
644 | $("#OnIdentify").addClass("annotationtoolbartab"); | 644 | $("#OnIdentify").addClass("annotationtoolbartab"); |
645 | $("#DrawMode").removeClass("annotationtoolbartab"); | 645 | $("#DrawMode").removeClass("annotationtoolbartab"); |
646 | - // $rootScope.isIdetifyClicked = true; | ||
647 | - // $rootScope.isDrawingToolSelected = false; | ||
648 | - // debugger; | 646 | + |
649 | if ($rootScope.CIAnotationIdentifyModeOff == true) { | 647 | if ($rootScope.CIAnotationIdentifyModeOff == true) { |
650 | $('.btnCursor').removeClass('activebtncolor'); | 648 | $('.btnCursor').removeClass('activebtncolor'); |
651 | 649 | ||
652 | } else { | 650 | } else { |
653 | - // $("#canvasPaint").css("display", "none"); | ||
654 | - // $("#canvas").css("display", "none"); | ||
655 | - | ||
656 | - // $("#canvasPaint").css("z-index", "0"); | ||
657 | - // $("#canvas").css("z-index", "0"); | 651 | + |
658 | $('.btnCursor').removeClass('activebtncolor'); | 652 | $('.btnCursor').removeClass('activebtncolor'); |
659 | 653 | ||
660 | } | 654 | } |
@@ -673,26 +667,86 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -673,26 +667,86 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
673 | } | 667 | } |
674 | 668 | ||
675 | $rootScope.switchToTransparencycanvas = function () { | 669 | $rootScope.switchToTransparencycanvas = function () { |
670 | + | ||
671 | + if ($rootScope.isModestyCanvasVisible == true) { | ||
672 | + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']"); | ||
673 | + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { | ||
674 | + for (var j = 0; j < modestyTransCanvases.length; j++) { | ||
675 | + var ctx = document.getElementById(modestyTransCanvases[j].id); | ||
676 | + | ||
677 | + if (ctx.style.visibility == "visible") { | ||
676 | 678 | ||
677 | - var x = $("#canvas").css("z-index"); | ||
678 | - var y = $("#canvasPaint").css("z-index"); | ||
679 | - x = parseInt(x) + 1; | ||
680 | - y = parseInt(y) + 1; | ||
681 | - if (x > y) { | ||
682 | - $(".ui-wrapper").css("z-index", x); | ||
683 | - $("#canvas").css("z-index", x); | ||
684 | - $rootScope.UIWrapperZIndex = x; | 679 | + if ($("#OnIdentify").hasClass("annotationtoolbartab")) { |
685 | 680 | ||
681 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
682 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
683 | + var TransCanvasZindex = ctx.style.zIndex; | ||
684 | + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex); | ||
685 | + MaxZindexVal = MaxZindexVal + 1; | ||
686 | + $("#canvas").css("z-index", MaxZindexVal); | ||
687 | + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal); | ||
688 | + | ||
689 | + } | ||
690 | + else { | ||
691 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
692 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
693 | + var TransCanvasZindex = ctx.style.zIndex; | ||
694 | + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex); | ||
695 | + MaxZindexVal = parseInt(MaxZindexVal + 1); | ||
696 | + | ||
697 | + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) { | ||
698 | + | ||
699 | + $("#canvasPaint").css("z-index", MaxZindexVal); | ||
700 | + } | ||
701 | + else { | ||
702 | + $("#canvas").css("z-index", MaxZindexVal); | ||
703 | + } | ||
704 | + | ||
705 | + } | ||
706 | + } | ||
707 | + else | ||
708 | + { | ||
709 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
710 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
711 | + drawCanvasZindex = parseInt(drawCanvasZindex) + 1; | ||
712 | + paintCanvasZindex = parseInt(paintCanvasZindex) + 1; | ||
713 | + if (drawCanvasZindex > paintCanvasZindex) { | ||
714 | + $(".ui-wrapper").css("z-index", drawCanvasZindex); | ||
715 | + $("#canvas").css("z-index", drawCanvasZindex); | ||
716 | + $rootScope.UIWrapperZIndex = drawCanvasZindex; | ||
717 | + } | ||
718 | + else { | ||
719 | + $(".ui-wrapper").css("z-index", paintCanvasZindex); | ||
720 | + $("#canvas").css("z-index", paintCanvasZindex); | ||
721 | + $rootScope.UIWrapperZIndex = paintCanvasZindex; | ||
722 | + } | ||
723 | + | ||
724 | + } | ||
725 | + } | ||
726 | + } | ||
727 | + | ||
728 | + } | ||
729 | + else | ||
730 | + { | ||
731 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
732 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
733 | + drawCanvasZindex = parseInt(drawCanvasZindex) + 1; | ||
734 | + paintCanvasZindex = parseInt(paintCanvasZindex) + 1; | ||
735 | + if (drawCanvasZindex > paintCanvasZindex) { | ||
736 | + $(".ui-wrapper").css("z-index", drawCanvasZindex); | ||
737 | + $("#canvas").css("z-index", drawCanvasZindex); | ||
738 | + $rootScope.UIWrapperZIndex = drawCanvasZindex; | ||
686 | } | 739 | } |
687 | else { | 740 | else { |
688 | - $(".ui-wrapper").css("z-index", y); | ||
689 | - $("#canvas").css("z-index", y); | ||
690 | - $rootScope.UIWrapperZIndex = y; | 741 | + $(".ui-wrapper").css("z-index", paintCanvasZindex); |
742 | + $("#canvas").css("z-index", paintCanvasZindex); | ||
743 | + $rootScope.UIWrapperZIndex = paintCanvasZindex; | ||
691 | } | 744 | } |
692 | - | 745 | + } |
693 | } | 746 | } |
694 | 747 | ||
695 | $rootScope.DrawingMode = function () { | 748 | $rootScope.DrawingMode = function () { |
749 | + | ||
696 | //Annotation History | 750 | //Annotation History |
697 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 751 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
698 | $("#OnIdentify").removeClass("annotationtoolbartab"); | 752 | $("#OnIdentify").removeClass("annotationtoolbartab"); |
@@ -726,14 +780,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -726,14 +780,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
726 | $("#canvasPaint").css("display", "block"); | 780 | $("#canvasPaint").css("display", "block"); |
727 | $("#canvas").css("display", "block"); | 781 | $("#canvas").css("display", "block"); |
728 | 782 | ||
729 | - $rootScope.switchCanvas(); | ||
730 | - $rootScope.shapeType = "Line"; | ||
731 | - | ||
732 | $('.btnCursor').removeClass('activebtncolor'); | 783 | $('.btnCursor').removeClass('activebtncolor'); |
733 | $(".btn-annotation").removeClass("activebtncolor"); | 784 | $(".btn-annotation").removeClass("activebtncolor"); |
734 | $(".btn-annotation-line").addClass("activebtncolor"); | 785 | $(".btn-annotation-line").addClass("activebtncolor"); |
735 | $("#OnIdentify").removeClass('annotationtoolbartab'); | 786 | $("#OnIdentify").removeClass('annotationtoolbartab'); |
736 | $("#DrawMode").addClass('annotationtoolbartab'); | 787 | $("#DrawMode").addClass('annotationtoolbartab'); |
788 | + | ||
789 | + | ||
790 | + $rootScope.switchCanvas(); | ||
791 | + $rootScope.shapeType = "Line"; | ||
792 | + | ||
793 | + | ||
737 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 794 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
738 | } | 795 | } |
739 | 796 | ||
@@ -742,16 +799,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -742,16 +799,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
742 | $("#canvasPaint").css("display", "block"); | 799 | $("#canvasPaint").css("display", "block"); |
743 | $("#canvas").css("display", "block"); | 800 | $("#canvas").css("display", "block"); |
744 | 801 | ||
745 | - $rootScope.switchCanvas(); | ||
746 | - $rootScope.switchCanvas(); | ||
747 | - $rootScope.setListManagerZindex = true; | ||
748 | - $rootScope.shapeType = "Pin"; | ||
749 | - | ||
750 | $('.btnCursor').removeClass('activebtncolor'); | 802 | $('.btnCursor').removeClass('activebtncolor'); |
751 | $(".btn-annotation").removeClass("activebtncolor"); | 803 | $(".btn-annotation").removeClass("activebtncolor"); |
752 | $(".btn-annotation-pin").addClass("activebtncolor"); | 804 | $(".btn-annotation-pin").addClass("activebtncolor"); |
753 | $("#OnIdentify").removeClass('annotationtoolbartab'); | 805 | $("#OnIdentify").removeClass('annotationtoolbartab'); |
754 | $("#DrawMode").addClass('annotationtoolbartab'); | 806 | $("#DrawMode").addClass('annotationtoolbartab'); |
807 | + | ||
808 | + $rootScope.switchCanvas(); | ||
809 | + $rootScope.setListManagerZindex = true; | ||
810 | + $rootScope.shapeType = "Pin"; | ||
811 | + | ||
812 | + | ||
755 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 813 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
756 | } | 814 | } |
757 | 815 | ||
@@ -772,17 +830,25 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -772,17 +830,25 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
772 | $rootScope.setListManagerZindex = true; | 830 | $rootScope.setListManagerZindex = true; |
773 | $("#canvasPaint").css("display", "block"); | 831 | $("#canvasPaint").css("display", "block"); |
774 | $("#canvas").css("display", "block"); | 832 | $("#canvas").css("display", "block"); |
775 | - $rootScope.switchCanvas(); | ||
776 | - $rootScope.shapeType = "Rectangle"; | 833 | + |
777 | $('.btnCursor').removeClass('activebtncolor'); | 834 | $('.btnCursor').removeClass('activebtncolor'); |
778 | $(".btn-annotation").removeClass("activebtncolor"); | 835 | $(".btn-annotation").removeClass("activebtncolor"); |
779 | $(".btn-annotation-rectangle").addClass("activebtncolor"); | 836 | $(".btn-annotation-rectangle").addClass("activebtncolor"); |
780 | $("#OnIdentify").removeClass('annotationtoolbartab'); | 837 | $("#OnIdentify").removeClass('annotationtoolbartab'); |
781 | $("#DrawMode").addClass('annotationtoolbartab'); | 838 | $("#DrawMode").addClass('annotationtoolbartab'); |
839 | + | ||
840 | + $rootScope.switchCanvas(); | ||
841 | + $rootScope.shapeType = "Rectangle"; | ||
842 | + | ||
782 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 843 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
783 | } | 844 | } |
784 | 845 | ||
785 | $rootScope.paintBrush = function () { | 846 | $rootScope.paintBrush = function () { |
847 | + $('.btnCursor').removeClass('activebtncolor'); | ||
848 | + $(".btn-annotation").removeClass("activebtncolor"); | ||
849 | + $(".btn-annotation-brush").addClass("activebtncolor"); | ||
850 | + $("#OnIdentify").removeClass('annotationtoolbartab'); | ||
851 | + $("#DrawMode").addClass('annotationtoolbartab'); | ||
786 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 852 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
787 | if ($rootScope.disableAnnotationtoolOnListManager == true) { | 853 | if ($rootScope.disableAnnotationtoolOnListManager == true) { |
788 | $rootScope.switchCanvas(); | 854 | $rootScope.switchCanvas(); |
@@ -801,7 +867,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -801,7 +867,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
801 | 867 | ||
802 | } else { | 868 | } else { |
803 | 869 | ||
804 | - // $('.btnCursor').addClass('activebtncolor'); | ||
805 | $rootScope.setListManagerZindex = true; | 870 | $rootScope.setListManagerZindex = true; |
806 | $("#canvasPaint").css("display", "block"); | 871 | $("#canvasPaint").css("display", "block"); |
807 | $("#canvas").css("display", "block"); | 872 | $("#canvas").css("display", "block"); |
@@ -821,8 +886,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -821,8 +886,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
821 | 886 | ||
822 | $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity); | 887 | $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity); |
823 | 888 | ||
824 | - | ||
825 | - | ||
826 | if ($rootScope.shapeSize == '') { | 889 | if ($rootScope.shapeSize == '') { |
827 | $('#canvasPaint').sketch({ defaultSize: 1 }); | 890 | $('#canvasPaint').sketch({ defaultSize: 1 }); |
828 | } | 891 | } |
@@ -830,17 +893,58 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -830,17 +893,58 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
830 | $('#canvasPaint').sketch(); | 893 | $('#canvasPaint').sketch(); |
831 | 894 | ||
832 | } | 895 | } |
833 | - | ||
834 | } | 896 | } |
835 | - | ||
836 | - $('.btnCursor').removeClass('activebtncolor'); | ||
837 | - $(".btn-annotation").removeClass("activebtncolor"); | ||
838 | - $(".btn-annotation-brush").addClass("activebtncolor"); | ||
839 | - $("#OnIdentify").removeClass('annotationtoolbartab'); | ||
840 | - $("#DrawMode").addClass('annotationtoolbartab'); | ||
841 | } | 897 | } |
842 | 898 | ||
843 | $rootScope.switchCanvasToPaintCanvas = function (e) { | 899 | $rootScope.switchCanvasToPaintCanvas = function (e) { |
900 | + if ($rootScope.isModestyCanvasVisible == true) { | ||
901 | + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']"); | ||
902 | + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { | ||
903 | + for (var j = 0; j < modestyTransCanvases.length; j++) { | ||
904 | + var ctx = document.getElementById(modestyTransCanvases[j].id); | ||
905 | + if (ctx.style.visibility == "visible") { | ||
906 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
907 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
908 | + var TransCanvasZindex = ctx.style.zIndex; | ||
909 | + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex); | ||
910 | + MaxZindexVal = MaxZindexVal + 1; | ||
911 | + if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")) { | ||
912 | + if ($("#OnIdentify").hasClass("annotationtoolbartab")) { | ||
913 | + $("#canvas").css("z-index", MaxZindexVal); | ||
914 | + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal); | ||
915 | + } | ||
916 | + else { | ||
917 | + | ||
918 | + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) { | ||
919 | + $("#canvasPaint").css("z-index", MaxZindexVal); | ||
920 | + } | ||
921 | + else { | ||
922 | + $("#canvas").css("z-index", MaxZindexVal); | ||
923 | + } | ||
924 | + } | ||
925 | + } | ||
926 | + } | ||
927 | + else { | ||
928 | + | ||
929 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
930 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
931 | + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex); | ||
932 | + MaxZindexVal = parseInt(MaxZindexVal + 1); | ||
933 | + | ||
934 | + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) { | ||
935 | + $("#canvasPaint").css("z-index", MaxZindexVal); | ||
936 | + } | ||
937 | + | ||
938 | + else { | ||
939 | + $("#canvas").css("z-index", MaxZindexVal); | ||
940 | + } | ||
941 | + | ||
942 | + } | ||
943 | + } | ||
944 | + } | ||
945 | + | ||
946 | + } | ||
947 | + else { | ||
844 | var canvasPaint_zIndex = $('#canvasPaint').css("z-index"); | 948 | var canvasPaint_zIndex = $('#canvasPaint').css("z-index"); |
845 | var canvas_zIndex = $('#canvas').css("z-index"); | 949 | var canvas_zIndex = $('#canvas').css("z-index"); |
846 | if (canvas_zIndex > canvasPaint_zIndex) { | 950 | if (canvas_zIndex > canvasPaint_zIndex) { |
@@ -852,18 +956,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -852,18 +956,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
852 | } | 956 | } |
853 | $('#canvasPaint').css("z-index", canvasPaint_zIndex); | 957 | $('#canvasPaint').css("z-index", canvasPaint_zIndex); |
854 | } | 958 | } |
959 | + } | ||
855 | 960 | ||
856 | $rootScope.DrawCircle = function (e) { | 961 | $rootScope.DrawCircle = function (e) { |
857 | $rootScope.setListManagerZindex = true; | 962 | $rootScope.setListManagerZindex = true; |
858 | $("#canvasPaint").css("display", "block"); | 963 | $("#canvasPaint").css("display", "block"); |
859 | $("#canvas").css("display", "block"); | 964 | $("#canvas").css("display", "block"); |
860 | - $rootScope.switchCanvas(); | ||
861 | - $rootScope.shapeType = "Circle"; | 965 | + |
862 | $('.btnCursor').removeClass('activebtncolor'); | 966 | $('.btnCursor').removeClass('activebtncolor'); |
863 | $(".btn-annotation").removeClass("activebtncolor"); | 967 | $(".btn-annotation").removeClass("activebtncolor"); |
864 | $(".btn-annotation-circle").addClass("activebtncolor"); | 968 | $(".btn-annotation-circle").addClass("activebtncolor"); |
865 | $("#OnIdentify").removeClass('annotationtoolbartab'); | 969 | $("#OnIdentify").removeClass('annotationtoolbartab'); |
866 | $("#DrawMode").addClass('annotationtoolbartab'); | 970 | $("#DrawMode").addClass('annotationtoolbartab'); |
971 | + | ||
972 | + $rootScope.switchCanvas(); | ||
973 | + $rootScope.shapeType = "Circle"; | ||
974 | + | ||
867 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 975 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
868 | } | 976 | } |
869 | 977 | ||
@@ -871,13 +979,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -871,13 +979,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
871 | $rootScope.setListManagerZindex = true; | 979 | $rootScope.setListManagerZindex = true; |
872 | $("#canvasPaint").css("display", "block"); | 980 | $("#canvasPaint").css("display", "block"); |
873 | $("#canvas").css("display", "block"); | 981 | $("#canvas").css("display", "block"); |
874 | - $rootScope.switchCanvas(); | ||
875 | - $rootScope.shapeType = "Arrow"; | 982 | + |
876 | $('.btnCursor').removeClass('activebtncolor'); | 983 | $('.btnCursor').removeClass('activebtncolor'); |
877 | $(".btn-annotation").removeClass("activebtncolor"); | 984 | $(".btn-annotation").removeClass("activebtncolor"); |
878 | $(".btn-annotation-arrow").addClass("activebtncolor"); | 985 | $(".btn-annotation-arrow").addClass("activebtncolor"); |
879 | $("#OnIdentify").removeClass('annotationtoolbartab'); | 986 | $("#OnIdentify").removeClass('annotationtoolbartab'); |
880 | $("#DrawMode").addClass('annotationtoolbartab'); | 987 | $("#DrawMode").addClass('annotationtoolbartab'); |
988 | + | ||
989 | + $rootScope.switchCanvas(); | ||
990 | + $rootScope.shapeType = "Arrow"; | ||
991 | + | ||
881 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 992 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
882 | } | 993 | } |
883 | $rootScope.DrawText = function () { | 994 | $rootScope.DrawText = function () { |
@@ -885,14 +996,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -885,14 +996,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
885 | $rootScope.setListManagerZindex = true; | 996 | $rootScope.setListManagerZindex = true; |
886 | $("#canvasPaint").css("display", "block"); | 997 | $("#canvasPaint").css("display", "block"); |
887 | $("#canvas").css("display", "block"); | 998 | $("#canvas").css("display", "block"); |
888 | - $rootScope.switchCanvas(); | ||
889 | 999 | ||
890 | - $rootScope.shapeType = "TextArea"; | ||
891 | $('.btnCursor').removeClass('activebtncolor'); | 1000 | $('.btnCursor').removeClass('activebtncolor'); |
892 | $(".btn-annotation").removeClass("activebtncolor"); | 1001 | $(".btn-annotation").removeClass("activebtncolor"); |
893 | $(".btn-annotation-Text").addClass("activebtncolor"); | 1002 | $(".btn-annotation-Text").addClass("activebtncolor"); |
894 | $("#OnIdentify").removeClass('annotationtoolbartab'); | 1003 | $("#OnIdentify").removeClass('annotationtoolbartab'); |
895 | $("#DrawMode").addClass('annotationtoolbartab'); | 1004 | $("#DrawMode").addClass('annotationtoolbartab'); |
1005 | + | ||
1006 | + $rootScope.switchCanvas(); | ||
1007 | + | ||
1008 | + $rootScope.shapeType = "TextArea"; | ||
1009 | + | ||
896 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 1010 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
897 | } | 1011 | } |
898 | 1012 | ||
@@ -908,15 +1022,75 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -908,15 +1022,75 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
908 | 1022 | ||
909 | 1023 | ||
910 | $rootScope.switchCanvas = function () { | 1024 | $rootScope.switchCanvas = function () { |
911 | - var x = $('#canvasPaint').css("z-index"); | 1025 | + |
1026 | + if ($rootScope.isModestyCanvasVisible == true) { | ||
1027 | + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']"); | ||
1028 | + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { | ||
1029 | + for (var j = 0; j < modestyTransCanvases.length; j++) { | ||
1030 | + var ctx = document.getElementById(modestyTransCanvases[j].id); | ||
912 | 1031 | ||
913 | - var y = $('#canvas').css("z-index"); | ||
914 | - if (x > y) { | ||
915 | - y = parseInt(x) + 1; | ||
916 | - } else { | ||
917 | - y = parseInt(y) + 1; | 1032 | + if (ctx.style.visibility == "visible") { |
1033 | + | ||
1034 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
1035 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
1036 | + var TransCanvasZindex = ctx.style.zIndex; | ||
1037 | + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex); | ||
1038 | + MaxZindexVal = MaxZindexVal + 1; | ||
1039 | + | ||
1040 | + | ||
1041 | + if ($("#OnIdentify").hasClass("annotationtoolbartab")) { | ||
1042 | + | ||
1043 | + $("#canvas").css("z-index", MaxZindexVal); | ||
1044 | + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal); | ||
1045 | + | ||
1046 | + } | ||
1047 | + else { | ||
1048 | + | ||
1049 | + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) { | ||
1050 | + | ||
1051 | + $("#canvasPaint").css("z-index", MaxZindexVal); | ||
1052 | + } | ||
1053 | + else { | ||
1054 | + $("#canvas").css("z-index", MaxZindexVal); | ||
1055 | + } | ||
1056 | + | ||
1057 | + } | ||
1058 | + } | ||
1059 | + else { | ||
1060 | + | ||
1061 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
1062 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
1063 | + | ||
1064 | + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex); | ||
1065 | + MaxZindexVal = parseInt(MaxZindexVal + 1); | ||
1066 | + | ||
1067 | + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) { | ||
1068 | + | ||
1069 | + $("#canvasPaint").css("z-index", MaxZindexVal); | ||
1070 | + } | ||
1071 | + | ||
1072 | + else { | ||
1073 | + $("#canvas").css("z-index", MaxZindexVal); | ||
1074 | + } | ||
1075 | + } | ||
1076 | + } | ||
1077 | + } | ||
1078 | + } | ||
1079 | + else | ||
1080 | + { | ||
1081 | + | ||
1082 | + var drawCanvasZindex = $("#canvas").css("z-index"); | ||
1083 | + var paintCanvasZindex = $("#canvasPaint").css("z-index"); | ||
1084 | + | ||
1085 | + | ||
1086 | + if (drawCanvasZindex > paintCanvasZindex) { | ||
1087 | + paintCanvasZindex = parseInt(drawCanvasZindex) + 1; | ||
1088 | + } else { | ||
1089 | + paintCanvasZindex = parseInt(paintCanvasZindex) + 1; | ||
1090 | + } | ||
1091 | + $('#canvas').css("z-index", paintCanvasZindex); | ||
918 | } | 1092 | } |
919 | - $('#canvas').css("z-index", y); | 1093 | + |
920 | } | 1094 | } |
921 | $rootScope.EraseDrawing = function () { | 1095 | $rootScope.EraseDrawing = function () { |
922 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; | 1096 | $rootScope.isAnnotaionToolBarDrawingModeActive = true; |
@@ -1078,9 +1252,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -1078,9 +1252,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
1078 | $("#edit-slider-4").css({ "pointer-events": "none" }); | 1252 | $("#edit-slider-4").css({ "pointer-events": "none" }); |
1079 | $("#editstylebackgroundcolor").css({ "pointer-events": "none" }); | 1253 | $("#editstylebackgroundcolor").css({ "pointer-events": "none" }); |
1080 | } | 1254 | } |
1081 | - //$("#borderWidthCanvasElement").change(function () { | ||
1082 | - // $(".marginTopBtm10 div.outlinediv").css("border-color", x); | ||
1083 | - //}); | 1255 | + |
1084 | } else { | 1256 | } else { |
1085 | 1257 | ||
1086 | document.getElementById('fill-option').checked = isfilloptionChecked; | 1258 | document.getElementById('fill-option').checked = isfilloptionChecked; |
@@ -1963,35 +2135,35 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -1963,35 +2135,35 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
1963 | case "Line": | 2135 | case "Line": |
1964 | $(".line").remove(); | 2136 | $(".line").remove(); |
1965 | $rootScope.isLinePreviewCompleted = true; | 2137 | $rootScope.isLinePreviewCompleted = true; |
1966 | - $("#canvasDiv").append("<div class='line' style='z-index:610;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); | 2138 | + $("#canvasDiv").append("<div class='line' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); |
1967 | $rootScope.Annotationangle(); | 2139 | $rootScope.Annotationangle(); |
1968 | break; | 2140 | break; |
1969 | case "Arrow": | 2141 | case "Arrow": |
1970 | $(".arrow").remove(); | 2142 | $(".arrow").remove(); |
1971 | $rootScope.isArrowPreviewCompleted = true; | 2143 | $rootScope.isArrowPreviewCompleted = true; |
1972 | - $("#canvasDiv").append("<div class='arrow' style='z-index:610;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='border-bottom: 9px solid transparent;border-right: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left: -6px;position: absolute;top: -8px;width: 0;'></div></div>"); | 2144 | + $("#canvasDiv").append("<div class='arrow' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='border-bottom: 9px solid transparent;border-right: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left: -6px;position: absolute;top: -8px;width: 0;'></div></div>"); |
1973 | $rootScope.Annotationangle(); | 2145 | $rootScope.Annotationangle(); |
1974 | break; | 2146 | break; |
1975 | case "Pin": | 2147 | case "Pin": |
1976 | $(".pin").remove(); | 2148 | $(".pin").remove(); |
1977 | $rootScope.isPinPreviewCompleted = true; | 2149 | $rootScope.isPinPreviewCompleted = true; |
1978 | - $("#canvasDiv").append("<div class='pin' style='z-index:610;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='background-color:#fff;left: -8px;position: absolute;top: -6px;width: 10;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>"); | 2150 | + $("#canvasDiv").append("<div class='pin' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='background-color:#fff;left: -8px;position: absolute;top: -6px;width: 10;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>"); |
1979 | $rootScope.Annotationangle(); | 2151 | $rootScope.Annotationangle(); |
1980 | break; | 2152 | break; |
1981 | case "Circle": | 2153 | case "Circle": |
1982 | $(".circle").remove(); | 2154 | $(".circle").remove(); |
1983 | $rootScope.isCirclePreviewCompleted = true; | 2155 | $rootScope.isCirclePreviewCompleted = true; |
1984 | - $("#canvasDiv").append("<div class='circle' style='z-index:610;border-radius:50%;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); | 2156 | + $("#canvasDiv").append("<div class='circle' style='z-index:12001;border-radius:50%;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); |
1985 | break; | 2157 | break; |
1986 | case "Rectangle": | 2158 | case "Rectangle": |
1987 | $(".rectangle").remove(); | 2159 | $(".rectangle").remove(); |
1988 | $rootScope.isRectanglePreviewCompleted = true; | 2160 | $rootScope.isRectanglePreviewCompleted = true; |
1989 | - $("#canvasDiv").append("<div class='rectangle' style='z-index:610;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); | 2161 | + $("#canvasDiv").append("<div class='rectangle' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); |
1990 | break; | 2162 | break; |
1991 | case "TextArea": | 2163 | case "TextArea": |
1992 | $(".textarea").remove(); | 2164 | $(".textarea").remove(); |
1993 | $rootScope.isTextAreaPreviewCompleted = true; | 2165 | $rootScope.isTextAreaPreviewCompleted = true; |
1994 | - $("#canvasDiv").append("<div class='textarea' style='z-index:610;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); | 2166 | + $("#canvasDiv").append("<div class='textarea' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); |
1995 | break; | 2167 | break; |
1996 | 2168 | ||
1997 | } | 2169 | } |