Commit 7699e51718880e29d9999630f71f5d42199e5855

Authored by Nikita Kulshreshtha
2 parents e6065c82 df546f12

Merge branch 'ModestySettIssue' into Develop

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;
@@ -737,7 +739,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -737,7 +739,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
737 739
738 //set max for LayerNumber input 740 //set max for LayerNumber input
739 $rootScope.totalLayers = dataLength - 1; 741 $rootScope.totalLayers = dataLength - 1;
740 - // debugger 742 +
741 $('#txtLayerNumber').attr('max', $rootScope.totalLayers); 743 $('#txtLayerNumber').attr('max', $rootScope.totalLayers);
742 $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); 744 $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers);
743 745
@@ -1564,7 +1566,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -1564,7 +1566,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1564 // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); 1566 // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top);
1565 $scope.MultiLanguageAnnationArray = []; 1567 $scope.MultiLanguageAnnationArray = [];
1566 $scope.MultiLanguageAnnationArray.push(annotationText); 1568 $scope.MultiLanguageAnnationArray.push(annotationText);
1567 - 1569 +
1568 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); 1570 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
1569 } 1571 }
1570 else { 1572 else {
@@ -1590,7 +1592,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -1590,7 +1592,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1590 $scope.MultiLanguageAnnationArray = []; 1592 $scope.MultiLanguageAnnationArray = [];
1591 $scope.MultiLanguageAnnationArray.push(annotationText); 1593 $scope.MultiLanguageAnnationArray.push(annotationText);
1592 1594
1593 - 1595 +
1594 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); 1596 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
1595 } 1597 }
1596 1598
@@ -2801,7 +2803,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -2801,7 +2803,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2801 return null; 2803 return null;
2802 } 2804 }
2803 } 2805 }
2804 - 2806 +
2805 2807
2806 //layer change function 2808 //layer change function
2807 $scope.LayerChange = function () { 2809 $scope.LayerChange = function () {
@@ -2811,7 +2813,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -2811,7 +2813,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2811 // $rootScope.isListManagerSelected = false; 2813 // $rootScope.isListManagerSelected = false;
2812 2814
2813 $rootScope.CloseListManager(); 2815 $rootScope.CloseListManager();
2814 -  
2815 $scope.isLayerChange = true; 2816 $scope.isLayerChange = true;
2816 $rootScope.isLoading = true; 2817 $rootScope.isLoading = true;
2817 $('#spinner').css('visibility', 'visible'); 2818 $('#spinner').css('visibility', 'visible');
@@ -2953,17 +2954,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -2953,17 +2954,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2953 $('#sppeachBubble').remove(); 2954 $('#sppeachBubble').remove();
2954 $(".com").remove(); 2955 $(".com").remove();
2955 $("#bord").remove(); 2956 $("#bord").remove();
2956 -  
2957 -  
2958 - if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")){ 2957 +
  2958 + if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")) {
2959 if ($rootScope.isAnnotatiomToolBarPopupActive == false) { 2959 if ($rootScope.isAnnotatiomToolBarPopupActive == false) {
2960 -  
2961 - if ($("#transparencyScale").css("display") == "block") { 2960 + if ($("#transparencyScale").css("display") == "block") {
2962 $rootScope.switchToTransparencycanvas(); 2961 $rootScope.switchToTransparencycanvas();
2963 } 2962 }
2964 } 2963 }
2965 else { 2964 else {
2966 -  
2967 if ($("#OnIdentify").hasClass("annotationtoolbartab")) { 2965 if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
2968 $rootScope.switchToTransparencycanvas(); 2966 $rootScope.switchToTransparencycanvas();
2969 } 2967 }
@@ -2972,14 +2970,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -2972,14 +2970,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2972 $rootScope.switchCanvas(); 2970 $rootScope.switchCanvas();
2973 } 2971 }
2974 } 2972 }
2975 -  
2976 } 2973 }
2977 else 2974 else
2978 { 2975 {
2979 if ($rootScope.isAnnotatiomToolBarPopupActive == true) { 2976 if ($rootScope.isAnnotatiomToolBarPopupActive == true) {
2980 -  
2981 $rootScope.CloseAnnotationTool(); 2977 $rootScope.CloseAnnotationTool();
2982 -  
2983 } 2978 }
2984 } 2979 }
2985 } 2980 }
@@ -2989,15 +2984,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -2989,15 +2984,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2989 2984
2990 $scope.DisableProgressBar = function () { 2985 $scope.DisableProgressBar = function () {
2991 2986
2992 - // alert('Disabled wait cursor is called');  
2993 -  
2994 2987
2995 if ($rootScope.isHighLight) { 2988 if ($rootScope.isHighLight) {
2996 - //alert('isHighlight: ' + $scope.isHighLight);  
2997 -  
2998 - //$('#btnHighLight').removeClass('btn btn-black');  
2999 - //$('#btnHighLight').addClass('btn-primary');  
3000 - 2989 +
3001 $("#btnHighLight").addClass("btn-primary"); 2990 $("#btnHighLight").addClass("btn-primary");
3002 $("#btnHighLight").removeClass("btn-black"); 2991 $("#btnHighLight").removeClass("btn-black");
3003 2992
@@ -3059,7 +3048,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3059,7 +3048,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3059 3048
3060 $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) { 3049 $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) {
3061 3050
3062 - //debugger; 3051 +
3063 if (isAnnotationForTBox == true) { 3052 if (isAnnotationForTBox == true) {
3064 //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 3053 //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
3065 // we decide the size of speech bubble 3054 // we decide the size of speech bubble
@@ -3297,7 +3286,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3297,7 +3286,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3297 var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length; 3286 var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length;
3298 // alert(Exists_annotation); 3287 // alert(Exists_annotation);
3299 // alert(pointClicked_annotation); 3288 // alert(pointClicked_annotation);
3300 - 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>"; 3289 + 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>";
3301 if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { 3290 if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
3302 if (Exists_annotation == 0) { 3291 if (Exists_annotation == 0) {
3303 $("#canvasDiv").append(sppechBubbleHTML_annotation); 3292 $("#canvasDiv").append(sppechBubbleHTML_annotation);
@@ -3522,12 +3511,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3522,12 +3511,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3522 $(".com_annotation").css("display", "none"); 3511 $(".com_annotation").css("display", "none");
3523 $("#bord_annotation").css({ "width": "0px", "display": "none" }); 3512 $("#bord_annotation").css({ "width": "0px", "display": "none" });
3524 $('.dynCross_anno').parent().parent().parent().remove(); 3513 $('.dynCross_anno').parent().parent().parent().remove();
3525 - 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>' 3514 + 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>'
3526 + '<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;">' 3515 + '<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;">'
3527 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">' 3516 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
3528 + '<img class="crossDiv_temp_annotation" style="width:18px" src=' + $rootScope.path + '></span></div>' 3517 + '<img class="crossDiv_temp_annotation" style="width:18px" src=' + $rootScope.path + '></span></div>'
3529 3518
3530 - + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord_annotation">' 3519 + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:59000;" id="bord_annotation">'
3531 + '</div>'; 3520 + '</div>';
3532 3521
3533 3522
@@ -3978,6 +3967,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3978,6 +3967,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3978 } 3967 }
3979 3968
3980 function mouseDownListener(e) { 3969 function mouseDownListener(e) {
  3970 +
3981 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. 3971 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
3982 var tCanvas = document.getElementById('transparencyCanvas'); 3972 var tCanvas = document.getElementById('transparencyCanvas');
3983 if ($('#transparencyScale').css("visibility") == 'visible') { 3973 if ($('#transparencyScale').css("visibility") == 'visible') {
@@ -4253,18 +4243,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4253,18 +4243,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4253 $("#annotationpainteraser").removeClass("activebtncolor"); 4243 $("#annotationpainteraser").removeClass("activebtncolor");
4254 if ($("#DrawMode").hasClass("annotationtoolbartab")) 4244 if ($("#DrawMode").hasClass("annotationtoolbartab"))
4255 { 4245 {
4256 - var drawCanvasZindex = $("#canvas").css("z-index");  
4257 - var paintCanvasZindex = $("#canvasPaint").css("z-index");  
4258 - drawCanvasZindex = parseInt(drawCanvasZindex) - 1;  
4259 - paintCanvasZindex = parseInt(paintCanvasZindex) - 1;  
4260 - if (drawCanvasZindex > paintCanvasZindex) {  
4261 - $(".ui-wrapper").css("z-index", drawCanvasZindex);  
4262 - $rootScope.UIWrapperZIndex = drawCanvasZindex; 4246 + if ($rootScope.isModestyCanvasVisible == true) {
  4247 +
  4248 + $rootScope.switchCanvas();
  4249 +
4263 } 4250 }
4264 else { 4251 else {
4265 - $(".ui-wrapper").css("z-index", paintCanvasZindex);  
4266 - $rootScope.UIWrapperZIndex = paintCanvasZindex; 4252 + var drawCanvasZindex = $("#canvas").css("z-index");
  4253 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  4254 + drawCanvasZindex = parseInt(drawCanvasZindex) - 1;
  4255 + paintCanvasZindex = parseInt(paintCanvasZindex) - 1;
  4256 + if (drawCanvasZindex > paintCanvasZindex) {
  4257 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  4258 + $rootScope.UIWrapperZIndex = drawCanvasZindex;
  4259 + }
  4260 + else {
  4261 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  4262 + $rootScope.UIWrapperZIndex = paintCanvasZindex;
  4263 + }
4267 } 4264 }
  4265 +
4268 } 4266 }
4269 else { 4267 else {
4270 $rootScope.switchToTransparencycanvas(); 4268 $rootScope.switchToTransparencycanvas();
@@ -4474,6 +4472,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4474,6 +4472,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4474 } 4472 }
4475 4473
4476 if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) { 4474 if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) {
  4475 + $rootScope.isModestyCanvasVisible = true;
4477 var canvasModesty = document.createElement('canvas'); 4476 var canvasModesty = document.createElement('canvas');
4478 canvasModesty.id = modestyTransCanvasId; 4477 canvasModesty.id = modestyTransCanvasId;
4479 canvasModesty.height = Height; 4478 canvasModesty.height = Height;
@@ -4482,7 +4481,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4482,7 +4481,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4482 canvasModesty.style.left = X + 'px'; 4481 canvasModesty.style.left = X + 'px';
4483 canvasModesty.style.top = Y + 'px'; 4482 canvasModesty.style.top = Y + 'px';
4484 canvasModesty.style.visibility = 'visible'; 4483 canvasModesty.style.visibility = 'visible';
4485 - canvasModesty.style.zIndex = '2000'; 4484 + canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
4486 canvasModesty.addEventListener('click', OnClickModestyTransCanvas); 4485 canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
4487 4486
4488 document.getElementById('canvasDiv').appendChild(canvasModesty); 4487 document.getElementById('canvasDiv').appendChild(canvasModesty);
@@ -5405,8 +5404,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5405,8 +5404,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5405 $scope.annotationTextArrayT2 = []; 5404 $scope.annotationTextArrayT2 = [];
5406 $scope.annotationTextArrayT1.push(annotations.annotationT1); 5405 $scope.annotationTextArrayT1.push(annotations.annotationT1);
5407 $scope.annotationTextArrayT2.push(annotations.annotationT2); 5406 $scope.annotationTextArrayT2.push(annotations.annotationT2);
5408 -  
5409 - 5407 +
5410 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); 5408 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
5411 } 5409 }
5412 else 5410 else
@@ -5418,7 +5416,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5418,7 +5416,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5418 $scope.annotationTextArrayT1.push(annotations.annotationT1); 5416 $scope.annotationTextArrayT1.push(annotations.annotationT1);
5419 $scope.annotationTextArrayT2.push(annotations.annotationT2); 5417 $scope.annotationTextArrayT2.push(annotations.annotationT2);
5420 5418
5421 -  
5422 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); 5419 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
5423 } 5420 }
5424 5421
@@ -5503,8 +5500,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5503,8 +5500,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5503 if ($('#speechBubbleTrns').length > 0) { 5500 if ($('#speechBubbleTrns').length > 0) {
5504 $('#speechBubbleTrns').remove(); 5501 $('#speechBubbleTrns').remove();
5505 } 5502 }
  5503 +
  5504 + var tCanvasTopPos = $(".ui-wrapper").css("top");
  5505 + var tCanvasTopPosAftrSplit = tCanvasTopPos.split("p");
  5506 + var tCanvasHeight = $(".ui-wrapper").css("height");
  5507 + var tCanvasHeightAftrSplit = tCanvasHeight.split("p");
  5508 + var tCanvasAttr = parseInt(tCanvasTopPosAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]);
  5509 +
  5510 + if ((evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top) >= parseInt(tCanvasTopPosAftrSplit[0]) && (evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top) <= tCanvasAttr) {
  5511 +
5506 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); 5512 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
5507 5513
  5514 + }
  5515 + else {
  5516 +
  5517 + $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(evt);
  5518 +
  5519 + }
  5520 +
5508 5521
5509 } 5522 }
5510 5523
@@ -5549,7 +5562,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5549,7 +5562,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5549 $scope.annotationTextArrayT2 = []; 5562 $scope.annotationTextArrayT2 = [];
5550 $scope.annotationTextArrayT1.push(annotations.annotationT1); 5563 $scope.annotationTextArrayT1.push(annotations.annotationT1);
5551 $scope.annotationTextArrayT2.push(annotations.annotationT2); 5564 $scope.annotationTextArrayT2.push(annotations.annotationT2);
5552 - 5565 +
5553 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); 5566 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
5554 } 5567 }
5555 else 5568 else
@@ -5558,7 +5571,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5558,7 +5571,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5558 $scope.annotationTextArrayT2 = []; 5571 $scope.annotationTextArrayT2 = [];
5559 $scope.annotationTextArrayT1.push(annotations.annotationT1); 5572 $scope.annotationTextArrayT1.push(annotations.annotationT1);
5560 $scope.annotationTextArrayT2.push(annotations.annotationT2); 5573 $scope.annotationTextArrayT2.push(annotations.annotationT2);
5561 - 5574 +
5562 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); 5575 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
5563 } 5576 }
5564 } 5577 }
@@ -5657,8 +5670,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5657,8 +5670,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5657 5670
5658 5671
5659 $scope.onTransparencyChange = function (ev, ui) { 5672 $scope.onTransparencyChange = function (ev, ui) {
5660 - //debugger;  
5661 - // alert('t change') 5673 +
5662 $scope.transNumber = ui.value; 5674 $scope.transNumber = ui.value;
5663 5675
5664 var tCanvas = document.getElementById('transparencyCanvas'); 5676 var tCanvas = document.getElementById('transparencyCanvas');
@@ -5716,7 +5728,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5716,7 +5728,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5716 } 5728 }
5717 5729
5718 $scope.CloseTransparencyBox = function () { 5730 $scope.CloseTransparencyBox = function () {
5719 - 5731 + $rootScope.isModestyCanvasVisible = false;
5720 //for enabling annoataions. 5732 //for enabling annoataions.
5721 //Now everything si done on canavases uswed in annotation toolbar. 5733 //Now everything si done on canavases uswed in annotation toolbar.
5722 5734
@@ -8425,8 +8437,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -8425,8 +8437,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8425 .from($scope.VocabTermTxt) 8437 .from($scope.VocabTermTxt)
8426 .where('_TermText == ' + $scope.searchFilter) 8438 .where('_TermText == ' + $scope.searchFilter)
8427 .select('_ActualTermNumber', '_TermText', '_cdId'); 8439 .select('_ActualTermNumber', '_TermText', '_cdId');
8428 - 8440 +
8429 if (EnteredDASearchTerm.length > 0) { 8441 if (EnteredDASearchTerm.length > 0) {
  8442 +
8430 $scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber); 8443 $scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber);
8431 8444
8432 $scope.IsSearchVisible = false; 8445 $scope.IsSearchVisible = false;
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -466,7 +466,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -466,7 +466,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
466 466
467 467
468 $rootScope.openParent = function (slug) { 468 $rootScope.openParent = function (slug) {
469 - // debugger; 469 +
470 var openViews = $rootScope.openViews; 470 var openViews = $rootScope.openViews;
471 if (openViews.length > 0) { 471 if (openViews.length > 0) {
472 $rootScope.openViews.splice(openViews.length - 1); 472 $rootScope.openViews.splice(openViews.length - 1);
@@ -641,21 +641,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -641,21 +641,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
641 $rootScope.CIAnotationIdentifyModeOff = false; 641 $rootScope.CIAnotationIdentifyModeOff = false;
642 $rootScope.OnIdentifyClick = function () { 642 $rootScope.OnIdentifyClick = function () {
643 643
644 - 644 +
645 $("#OnIdentify").addClass("annotationtoolbartab"); 645 $("#OnIdentify").addClass("annotationtoolbartab");
646 $("#DrawMode").removeClass("annotationtoolbartab"); 646 $("#DrawMode").removeClass("annotationtoolbartab");
647 - // $rootScope.isIdetifyClicked = true;  
648 - // $rootScope.isDrawingToolSelected = false;  
649 - // debugger; 647 +
650 if ($rootScope.CIAnotationIdentifyModeOff == true) { 648 if ($rootScope.CIAnotationIdentifyModeOff == true) {
651 $('.btnCursor').removeClass('activebtncolor'); 649 $('.btnCursor').removeClass('activebtncolor');
652 650
653 } else { 651 } else {
654 - // $("#canvasPaint").css("display", "none");  
655 - // $("#canvas").css("display", "none");  
656 -  
657 - // $("#canvasPaint").css("z-index", "0");  
658 - // $("#canvas").css("z-index", "0"); 652 +
659 $('.btnCursor').removeClass('activebtncolor'); 653 $('.btnCursor').removeClass('activebtncolor');
660 654
661 } 655 }
@@ -674,26 +668,86 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -674,26 +668,86 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
674 } 668 }
675 669
676 $rootScope.switchToTransparencycanvas = function () { 670 $rootScope.switchToTransparencycanvas = function () {
  671 +
  672 + if ($rootScope.isModestyCanvasVisible == true) {
  673 + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
  674 + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  675 + for (var j = 0; j < modestyTransCanvases.length; j++) {
  676 + var ctx = document.getElementById(modestyTransCanvases[j].id);
  677 +
  678 + if (ctx.style.visibility == "visible") {
677 679
678 - var x = $("#canvas").css("z-index");  
679 - var y = $("#canvasPaint").css("z-index");  
680 - x = parseInt(x) + 1;  
681 - y = parseInt(y) + 1;  
682 - if (x > y) {  
683 - $(".ui-wrapper").css("z-index", x);  
684 - $("#canvas").css("z-index", x);  
685 - $rootScope.UIWrapperZIndex = x; 680 + if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
686 681
  682 + var drawCanvasZindex = $("#canvas").css("z-index");
  683 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  684 + var TransCanvasZindex = ctx.style.zIndex;
  685 + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
  686 + MaxZindexVal = MaxZindexVal + 1;
  687 + $("#canvas").css("z-index", MaxZindexVal);
  688 + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
  689 +
  690 + }
  691 + else {
  692 + var drawCanvasZindex = $("#canvas").css("z-index");
  693 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  694 + var TransCanvasZindex = ctx.style.zIndex;
  695 + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
  696 + MaxZindexVal = parseInt(MaxZindexVal + 1);
  697 +
  698 + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
  699 +
  700 + $("#canvasPaint").css("z-index", MaxZindexVal);
  701 + }
  702 + else {
  703 + $("#canvas").css("z-index", MaxZindexVal);
  704 + }
  705 +
  706 + }
  707 + }
  708 + else
  709 + {
  710 + var drawCanvasZindex = $("#canvas").css("z-index");
  711 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  712 + drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
  713 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
  714 + if (drawCanvasZindex > paintCanvasZindex) {
  715 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  716 + $("#canvas").css("z-index", drawCanvasZindex);
  717 + $rootScope.UIWrapperZIndex = drawCanvasZindex;
  718 + }
  719 + else {
  720 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  721 + $("#canvas").css("z-index", paintCanvasZindex);
  722 + $rootScope.UIWrapperZIndex = paintCanvasZindex;
  723 + }
  724 +
  725 + }
  726 + }
  727 + }
  728 +
  729 + }
  730 + else
  731 + {
  732 + var drawCanvasZindex = $("#canvas").css("z-index");
  733 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  734 + drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
  735 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
  736 + if (drawCanvasZindex > paintCanvasZindex) {
  737 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  738 + $("#canvas").css("z-index", drawCanvasZindex);
  739 + $rootScope.UIWrapperZIndex = drawCanvasZindex;
687 } 740 }
688 else { 741 else {
689 - $(".ui-wrapper").css("z-index", y);  
690 - $("#canvas").css("z-index", y);  
691 - $rootScope.UIWrapperZIndex = y; 742 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  743 + $("#canvas").css("z-index", paintCanvasZindex);
  744 + $rootScope.UIWrapperZIndex = paintCanvasZindex;
692 } 745 }
693 - 746 + }
694 } 747 }
695 748
696 $rootScope.DrawingMode = function () { 749 $rootScope.DrawingMode = function () {
  750 +
697 //Annotation History 751 //Annotation History
698 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 752 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
699 $("#OnIdentify").removeClass("annotationtoolbartab"); 753 $("#OnIdentify").removeClass("annotationtoolbartab");
@@ -727,14 +781,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -727,14 +781,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
727 $("#canvasPaint").css("display", "block"); 781 $("#canvasPaint").css("display", "block");
728 $("#canvas").css("display", "block"); 782 $("#canvas").css("display", "block");
729 783
730 - $rootScope.switchCanvas();  
731 - $rootScope.shapeType = "Line";  
732 -  
733 $('.btnCursor').removeClass('activebtncolor'); 784 $('.btnCursor').removeClass('activebtncolor');
734 $(".btn-annotation").removeClass("activebtncolor"); 785 $(".btn-annotation").removeClass("activebtncolor");
735 $(".btn-annotation-line").addClass("activebtncolor"); 786 $(".btn-annotation-line").addClass("activebtncolor");
736 $("#OnIdentify").removeClass('annotationtoolbartab'); 787 $("#OnIdentify").removeClass('annotationtoolbartab');
737 $("#DrawMode").addClass('annotationtoolbartab'); 788 $("#DrawMode").addClass('annotationtoolbartab');
  789 +
  790 +
  791 + $rootScope.switchCanvas();
  792 + $rootScope.shapeType = "Line";
  793 +
  794 +
738 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 795 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
739 } 796 }
740 797
@@ -743,16 +800,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -743,16 +800,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
743 $("#canvasPaint").css("display", "block"); 800 $("#canvasPaint").css("display", "block");
744 $("#canvas").css("display", "block"); 801 $("#canvas").css("display", "block");
745 802
746 - $rootScope.switchCanvas();  
747 - $rootScope.switchCanvas();  
748 - $rootScope.setListManagerZindex = true;  
749 - $rootScope.shapeType = "Pin";  
750 -  
751 $('.btnCursor').removeClass('activebtncolor'); 803 $('.btnCursor').removeClass('activebtncolor');
752 $(".btn-annotation").removeClass("activebtncolor"); 804 $(".btn-annotation").removeClass("activebtncolor");
753 $(".btn-annotation-pin").addClass("activebtncolor"); 805 $(".btn-annotation-pin").addClass("activebtncolor");
754 $("#OnIdentify").removeClass('annotationtoolbartab'); 806 $("#OnIdentify").removeClass('annotationtoolbartab');
755 $("#DrawMode").addClass('annotationtoolbartab'); 807 $("#DrawMode").addClass('annotationtoolbartab');
  808 +
  809 + $rootScope.switchCanvas();
  810 + $rootScope.setListManagerZindex = true;
  811 + $rootScope.shapeType = "Pin";
  812 +
  813 +
756 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 814 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
757 } 815 }
758 816
@@ -773,17 +831,25 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -773,17 +831,25 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
773 $rootScope.setListManagerZindex = true; 831 $rootScope.setListManagerZindex = true;
774 $("#canvasPaint").css("display", "block"); 832 $("#canvasPaint").css("display", "block");
775 $("#canvas").css("display", "block"); 833 $("#canvas").css("display", "block");
776 - $rootScope.switchCanvas();  
777 - $rootScope.shapeType = "Rectangle"; 834 +
778 $('.btnCursor').removeClass('activebtncolor'); 835 $('.btnCursor').removeClass('activebtncolor');
779 $(".btn-annotation").removeClass("activebtncolor"); 836 $(".btn-annotation").removeClass("activebtncolor");
780 $(".btn-annotation-rectangle").addClass("activebtncolor"); 837 $(".btn-annotation-rectangle").addClass("activebtncolor");
781 $("#OnIdentify").removeClass('annotationtoolbartab'); 838 $("#OnIdentify").removeClass('annotationtoolbartab');
782 $("#DrawMode").addClass('annotationtoolbartab'); 839 $("#DrawMode").addClass('annotationtoolbartab');
  840 +
  841 + $rootScope.switchCanvas();
  842 + $rootScope.shapeType = "Rectangle";
  843 +
783 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 844 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
784 } 845 }
785 846
786 $rootScope.paintBrush = function () { 847 $rootScope.paintBrush = function () {
  848 + $('.btnCursor').removeClass('activebtncolor');
  849 + $(".btn-annotation").removeClass("activebtncolor");
  850 + $(".btn-annotation-brush").addClass("activebtncolor");
  851 + $("#OnIdentify").removeClass('annotationtoolbartab');
  852 + $("#DrawMode").addClass('annotationtoolbartab');
787 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 853 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
788 if ($rootScope.disableAnnotationtoolOnListManager == true) { 854 if ($rootScope.disableAnnotationtoolOnListManager == true) {
789 $rootScope.switchCanvas(); 855 $rootScope.switchCanvas();
@@ -802,7 +868,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -802,7 +868,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
802 868
803 } else { 869 } else {
804 870
805 - // $('.btnCursor').addClass('activebtncolor');  
806 $rootScope.setListManagerZindex = true; 871 $rootScope.setListManagerZindex = true;
807 $("#canvasPaint").css("display", "block"); 872 $("#canvasPaint").css("display", "block");
808 $("#canvas").css("display", "block"); 873 $("#canvas").css("display", "block");
@@ -828,8 +893,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -828,8 +893,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
828 893
829 $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity); 894 $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity);
830 895
831 -  
832 -  
833 if ($rootScope.shapeSize == '') { 896 if ($rootScope.shapeSize == '') {
834 $('#canvasPaint').sketch({ defaultSize: 1 }); 897 $('#canvasPaint').sketch({ defaultSize: 1 });
835 } 898 }
@@ -837,17 +900,58 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -837,17 +900,58 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
837 $('#canvasPaint').sketch(); 900 $('#canvasPaint').sketch();
838 901
839 } 902 }
840 -  
841 } 903 }
842 -  
843 - $('.btnCursor').removeClass('activebtncolor');  
844 - $(".btn-annotation").removeClass("activebtncolor");  
845 - $(".btn-annotation-brush").addClass("activebtncolor");  
846 - $("#OnIdentify").removeClass('annotationtoolbartab');  
847 - $("#DrawMode").addClass('annotationtoolbartab');  
848 } 904 }
849 905
850 $rootScope.switchCanvasToPaintCanvas = function (e) { 906 $rootScope.switchCanvasToPaintCanvas = function (e) {
  907 + if ($rootScope.isModestyCanvasVisible == true) {
  908 + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
  909 + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  910 + for (var j = 0; j < modestyTransCanvases.length; j++) {
  911 + var ctx = document.getElementById(modestyTransCanvases[j].id);
  912 + if (ctx.style.visibility == "visible") {
  913 + var drawCanvasZindex = $("#canvas").css("z-index");
  914 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  915 + var TransCanvasZindex = ctx.style.zIndex;
  916 + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
  917 + MaxZindexVal = MaxZindexVal + 1;
  918 + if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")) {
  919 + if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
  920 + $("#canvas").css("z-index", MaxZindexVal);
  921 + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
  922 + }
  923 + else {
  924 +
  925 + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
  926 + $("#canvasPaint").css("z-index", MaxZindexVal);
  927 + }
  928 + else {
  929 + $("#canvas").css("z-index", MaxZindexVal);
  930 + }
  931 + }
  932 + }
  933 + }
  934 + else {
  935 +
  936 + var drawCanvasZindex = $("#canvas").css("z-index");
  937 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  938 + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex);
  939 + MaxZindexVal = parseInt(MaxZindexVal + 1);
  940 +
  941 + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
  942 + $("#canvasPaint").css("z-index", MaxZindexVal);
  943 + }
  944 +
  945 + else {
  946 + $("#canvas").css("z-index", MaxZindexVal);
  947 + }
  948 +
  949 + }
  950 + }
  951 + }
  952 +
  953 + }
  954 + else {
851 var canvasPaint_zIndex = $('#canvasPaint').css("z-index"); 955 var canvasPaint_zIndex = $('#canvasPaint').css("z-index");
852 var canvas_zIndex = $('#canvas').css("z-index"); 956 var canvas_zIndex = $('#canvas').css("z-index");
853 if (canvas_zIndex > canvasPaint_zIndex) { 957 if (canvas_zIndex > canvasPaint_zIndex) {
@@ -859,18 +963,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -859,18 +963,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
859 } 963 }
860 $('#canvasPaint').css("z-index", canvasPaint_zIndex); 964 $('#canvasPaint').css("z-index", canvasPaint_zIndex);
861 } 965 }
  966 + }
862 967
863 $rootScope.DrawCircle = function (e) { 968 $rootScope.DrawCircle = function (e) {
864 $rootScope.setListManagerZindex = true; 969 $rootScope.setListManagerZindex = true;
865 $("#canvasPaint").css("display", "block"); 970 $("#canvasPaint").css("display", "block");
866 $("#canvas").css("display", "block"); 971 $("#canvas").css("display", "block");
867 - $rootScope.switchCanvas();  
868 - $rootScope.shapeType = "Circle"; 972 +
869 $('.btnCursor').removeClass('activebtncolor'); 973 $('.btnCursor').removeClass('activebtncolor');
870 $(".btn-annotation").removeClass("activebtncolor"); 974 $(".btn-annotation").removeClass("activebtncolor");
871 $(".btn-annotation-circle").addClass("activebtncolor"); 975 $(".btn-annotation-circle").addClass("activebtncolor");
872 $("#OnIdentify").removeClass('annotationtoolbartab'); 976 $("#OnIdentify").removeClass('annotationtoolbartab');
873 $("#DrawMode").addClass('annotationtoolbartab'); 977 $("#DrawMode").addClass('annotationtoolbartab');
  978 +
  979 + $rootScope.switchCanvas();
  980 + $rootScope.shapeType = "Circle";
  981 +
874 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 982 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
875 } 983 }
876 984
@@ -878,13 +986,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -878,13 +986,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
878 $rootScope.setListManagerZindex = true; 986 $rootScope.setListManagerZindex = true;
879 $("#canvasPaint").css("display", "block"); 987 $("#canvasPaint").css("display", "block");
880 $("#canvas").css("display", "block"); 988 $("#canvas").css("display", "block");
881 - $rootScope.switchCanvas();  
882 - $rootScope.shapeType = "Arrow"; 989 +
883 $('.btnCursor').removeClass('activebtncolor'); 990 $('.btnCursor').removeClass('activebtncolor');
884 $(".btn-annotation").removeClass("activebtncolor"); 991 $(".btn-annotation").removeClass("activebtncolor");
885 $(".btn-annotation-arrow").addClass("activebtncolor"); 992 $(".btn-annotation-arrow").addClass("activebtncolor");
886 $("#OnIdentify").removeClass('annotationtoolbartab'); 993 $("#OnIdentify").removeClass('annotationtoolbartab');
887 $("#DrawMode").addClass('annotationtoolbartab'); 994 $("#DrawMode").addClass('annotationtoolbartab');
  995 +
  996 + $rootScope.switchCanvas();
  997 + $rootScope.shapeType = "Arrow";
  998 +
888 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 999 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
889 } 1000 }
890 $rootScope.DrawText = function () { 1001 $rootScope.DrawText = function () {
@@ -892,14 +1003,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -892,14 +1003,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
892 $rootScope.setListManagerZindex = true; 1003 $rootScope.setListManagerZindex = true;
893 $("#canvasPaint").css("display", "block"); 1004 $("#canvasPaint").css("display", "block");
894 $("#canvas").css("display", "block"); 1005 $("#canvas").css("display", "block");
895 - $rootScope.switchCanvas();  
896 1006
897 - $rootScope.shapeType = "TextArea";  
898 $('.btnCursor').removeClass('activebtncolor'); 1007 $('.btnCursor').removeClass('activebtncolor');
899 $(".btn-annotation").removeClass("activebtncolor"); 1008 $(".btn-annotation").removeClass("activebtncolor");
900 $(".btn-annotation-Text").addClass("activebtncolor"); 1009 $(".btn-annotation-Text").addClass("activebtncolor");
901 $("#OnIdentify").removeClass('annotationtoolbartab'); 1010 $("#OnIdentify").removeClass('annotationtoolbartab');
902 $("#DrawMode").addClass('annotationtoolbartab'); 1011 $("#DrawMode").addClass('annotationtoolbartab');
  1012 +
  1013 + $rootScope.switchCanvas();
  1014 +
  1015 + $rootScope.shapeType = "TextArea";
  1016 +
903 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 1017 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
904 } 1018 }
905 1019
@@ -915,15 +1029,75 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -915,15 +1029,75 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
915 1029
916 1030
917 $rootScope.switchCanvas = function () { 1031 $rootScope.switchCanvas = function () {
918 - var x = $('#canvasPaint').css("z-index"); 1032 +
  1033 + if ($rootScope.isModestyCanvasVisible == true) {
  1034 + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
  1035 + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  1036 + for (var j = 0; j < modestyTransCanvases.length; j++) {
  1037 + var ctx = document.getElementById(modestyTransCanvases[j].id);
919 1038
920 - var y = $('#canvas').css("z-index");  
921 - if (x > y) {  
922 - y = parseInt(x) + 1;  
923 - } else {  
924 - y = parseInt(y) + 1; 1039 + if (ctx.style.visibility == "visible") {
  1040 +
  1041 + var drawCanvasZindex = $("#canvas").css("z-index");
  1042 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  1043 + var TransCanvasZindex = ctx.style.zIndex;
  1044 + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
  1045 + MaxZindexVal = MaxZindexVal + 1;
  1046 +
  1047 +
  1048 + if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
  1049 +
  1050 + $("#canvas").css("z-index", MaxZindexVal);
  1051 + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
  1052 +
  1053 + }
  1054 + else {
  1055 +
  1056 + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
  1057 +
  1058 + $("#canvasPaint").css("z-index", MaxZindexVal);
  1059 + }
  1060 + else {
  1061 + $("#canvas").css("z-index", MaxZindexVal);
  1062 + }
  1063 +
  1064 + }
  1065 + }
  1066 + else {
  1067 +
  1068 + var drawCanvasZindex = $("#canvas").css("z-index");
  1069 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  1070 +
  1071 + var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex);
  1072 + MaxZindexVal = parseInt(MaxZindexVal + 1);
  1073 +
  1074 + if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
  1075 +
  1076 + $("#canvasPaint").css("z-index", MaxZindexVal);
  1077 + }
  1078 +
  1079 + else {
  1080 + $("#canvas").css("z-index", MaxZindexVal);
  1081 + }
  1082 + }
  1083 + }
  1084 + }
  1085 + }
  1086 + else
  1087 + {
  1088 +
  1089 + var drawCanvasZindex = $("#canvas").css("z-index");
  1090 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  1091 +
  1092 +
  1093 + if (drawCanvasZindex > paintCanvasZindex) {
  1094 + paintCanvasZindex = parseInt(drawCanvasZindex) + 1;
  1095 + } else {
  1096 + paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
  1097 + }
  1098 + $('#canvas').css("z-index", paintCanvasZindex);
925 } 1099 }
926 - $('#canvas').css("z-index", y); 1100 +
927 } 1101 }
928 $rootScope.EraseDrawing = function () { 1102 $rootScope.EraseDrawing = function () {
929 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 1103 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
@@ -1085,9 +1259,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -1085,9 +1259,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1085 $("#edit-slider-4").css({ "pointer-events": "none" }); 1259 $("#edit-slider-4").css({ "pointer-events": "none" });
1086 $("#editstylebackgroundcolor").css({ "pointer-events": "none" }); 1260 $("#editstylebackgroundcolor").css({ "pointer-events": "none" });
1087 } 1261 }
1088 - //$("#borderWidthCanvasElement").change(function () {  
1089 - // $(".marginTopBtm10 div.outlinediv").css("border-color", x);  
1090 - //}); 1262 +
1091 } else { 1263 } else {
1092 1264
1093 document.getElementById('fill-option').checked = isfilloptionChecked; 1265 document.getElementById('fill-option').checked = isfilloptionChecked;
@@ -1970,35 +2142,35 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -1970,35 +2142,35 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1970 case "Line": 2142 case "Line":
1971 $(".line").remove(); 2143 $(".line").remove();
1972 $rootScope.isLinePreviewCompleted = true; 2144 $rootScope.isLinePreviewCompleted = true;
1973 - $("#canvasDiv").append("<div class='line' style='z-index:610;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); 2145 + $("#canvasDiv").append("<div class='line' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>");
1974 $rootScope.Annotationangle(); 2146 $rootScope.Annotationangle();
1975 break; 2147 break;
1976 case "Arrow": 2148 case "Arrow":
1977 $(".arrow").remove(); 2149 $(".arrow").remove();
1978 $rootScope.isArrowPreviewCompleted = true; 2150 $rootScope.isArrowPreviewCompleted = true;
1979 - $("#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>"); 2151 + $("#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>");
1980 $rootScope.Annotationangle(); 2152 $rootScope.Annotationangle();
1981 break; 2153 break;
1982 case "Pin": 2154 case "Pin":
1983 $(".pin").remove(); 2155 $(".pin").remove();
1984 $rootScope.isPinPreviewCompleted = true; 2156 $rootScope.isPinPreviewCompleted = true;
1985 - $("#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>"); 2157 + $("#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>");
1986 $rootScope.Annotationangle(); 2158 $rootScope.Annotationangle();
1987 break; 2159 break;
1988 case "Circle": 2160 case "Circle":
1989 $(".circle").remove(); 2161 $(".circle").remove();
1990 $rootScope.isCirclePreviewCompleted = true; 2162 $rootScope.isCirclePreviewCompleted = true;
1991 - $("#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>"); 2163 + $("#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>");
1992 break; 2164 break;
1993 case "Rectangle": 2165 case "Rectangle":
1994 $(".rectangle").remove(); 2166 $(".rectangle").remove();
1995 $rootScope.isRectanglePreviewCompleted = true; 2167 $rootScope.isRectanglePreviewCompleted = true;
1996 - $("#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>"); 2168 + $("#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>");
1997 break; 2169 break;
1998 case "TextArea": 2170 case "TextArea":
1999 $(".textarea").remove(); 2171 $(".textarea").remove();
2000 $rootScope.isTextAreaPreviewCompleted = true; 2172 $rootScope.isTextAreaPreviewCompleted = true;
2001 - $("#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>"); 2173 + $("#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>");
2002 break; 2174 break;
2003 2175
2004 } 2176 }