Commit ee65ccfa3ef5c8977dd14879d6bf7802f749c0d4

Authored by Nikita Kulshreshtha
2 parents 10bc5f49 ccdada3c

Merge branch 'TransparencyBoxResizingIssue' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -77,7 +77,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
77 77  
78 78 //extract
79 79 $rootScope.isExtract = false;
80   -
  80 + $rootScope.UIWrapperZIndex = 12000;
81 81  
82 82 $rootScope.whiteImageDataList = [];
83 83 $rootScope.whiteImageMRDataList = [];
... ... @@ -2880,6 +2880,34 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2880 2880 }
2881 2881  
2882 2882 $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));
  2883 +
  2884 + if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")){
  2885 + if ($rootScope.isAnnotatiomToolBarPopupOpenOnLayerChange == false) {
  2886 +
  2887 + if ($("#transparencyScale").css("display") == "block") {
  2888 + $rootScope.switchToTransparencycanvas();
  2889 + }
  2890 + }
  2891 + else {
  2892 +
  2893 + if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
  2894 + $rootScope.switchToTransparencycanvas();
  2895 + }
  2896 + else {
  2897 + $('.btnCursor').addClass('activebtncolor');
  2898 + $rootScope.switchCanvas();
  2899 + }
  2900 + }
  2901 +
  2902 + }
  2903 + else
  2904 + {
  2905 + if ($rootScope.isAnnotatiomToolBarPopupOpenOnLayerChange == true) {
  2906 +
  2907 + $rootScope.CloseAnnotationTool();
  2908 +
  2909 + }
  2910 + }
2883 2911 }
2884 2912 $rootScope.PreviouslayerNumbr = 0;
2885 2913  
... ... @@ -3195,7 +3223,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3195 3223 var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length;
3196 3224 // alert(Exists_annotation);
3197 3225 // alert(pointClicked_annotation);
3198   - var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.j + "'></div><div data=" + $scope.j + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-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>";
  3226 + 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>";
3199 3227 if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
3200 3228 if (Exists_annotation == 0) {
3201 3229 $("#canvasDiv").append(sppechBubbleHTML_annotation);
... ... @@ -3421,7 +3449,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3421 3449 $("#bord_annotation").css({ "width": "0px", "display": "none" });
3422 3450 $('.dynCross_anno').parent().parent().parent().remove();
3423 3451 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>'
3424   - + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;font-weight:bold;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">'
  3452 + + '<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;">'
3425 3453 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
3426 3454 + '<img class="crossDiv_temp_annotation" style="width:18px" src=' + $rootScope.path + '></span></div>'
3427 3455  
... ... @@ -4063,7 +4091,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4063 4091 //bind click listener
4064 4092 transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
4065 4093  
4066   - $(".ui-wrapper").css("z-index", "600");
  4094 + $(".ui-wrapper").css("z-index", $rootScope.UIWrapperZIndex);
4067 4095  
4068 4096 }
4069 4097 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
... ... @@ -4149,6 +4177,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4149 4177 $('#canvasPaint').sketch().actions = [];
4150 4178 $("#annotationpaintbrushsize").removeClass("activebtncolor");
4151 4179 $("#annotationpainteraser").removeClass("activebtncolor");
  4180 + if ($("#DrawMode").hasClass("annotationtoolbartab"))
  4181 + {
  4182 + var drawCanvasZindex = $("#canvas").css("z-index");
  4183 + var paintCanvasZindex = $("#canvasPaint").css("z-index");
  4184 + drawCanvasZindex = parseInt(drawCanvasZindex) - 1;
  4185 + paintCanvasZindex = parseInt(paintCanvasZindex) - 1;
  4186 + if (drawCanvasZindex > paintCanvasZindex) {
  4187 + $(".ui-wrapper").css("z-index", drawCanvasZindex);
  4188 + $rootScope.UIWrapperZIndex = drawCanvasZindex;
  4189 + }
  4190 + else {
  4191 + $(".ui-wrapper").css("z-index", paintCanvasZindex);
  4192 + $rootScope.UIWrapperZIndex = paintCanvasZindex;
  4193 + }
  4194 + }
  4195 + else {
  4196 + $rootScope.switchToTransparencycanvas();
  4197 + }
4152 4198 }
4153 4199  
4154 4200 //hide the speechbubble
... ... @@ -5027,7 +5073,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5027 5073 document.getElementById('canvasDiv').appendChild(transparencyCanvas);
5028 5074  
5029 5075 $('#transparencyCanvas').resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(); }, start: function (event, ui) { clearTransCanvas(); } });
5030   - $(".ui-wrapper").css("z-index", "600");
  5076 + $(".ui-wrapper").css("z-index", $rootScope.UIWrapperZIndex);
5031 5077  
5032 5078 //bind click listener
5033 5079 transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -511,6 +511,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
511 511 //annotation tool custom events
512 512 $rootScope.ShowAnnotationWindow = function () {
513 513 //7904
  514 + $rootScope.isAnnotatiomToolBarPopupOpenOnLayerChange = true;
514 515 $rootScope.isAnnotatiomToolBarPopupClosed = false;
515 516 $rootScope.isAnnotaionToolBarDrawingModeActive = false;
516 517 if ($rootScope.MenuModuleName == "DA" || $rootScope.MenuModuleName == "CI") {
... ... @@ -573,10 +574,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
573 574  
574 575 }
575 576  
  577 + if ($("#transparencyScale").css("display") == "block") {
  578 +
  579 + $rootScope.switchToTransparencycanvas();
  580 + }
  581 +
576 582 }
577 583  
578 584 $rootScope.CloseAnnotationTool = function () {
579 585 console.log('close');
  586 + $rootScope.isAnnotatiomToolBarPopupOpenOnLayerChange = false;
580 587 $rootScope.isAnnotatiomToolBarPopupClosed = true;
581 588 $("#OnIdentify").removeClass("annotationtoolbartab");
582 589 $("#DrawMode").removeClass("annotationtoolbartab");
... ... @@ -592,8 +599,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
592 599 $('.btnCursor').removeClass('activebtncolor');
593 600 $(".btn-annotation").removeClass("activebtncolor");
594 601 $rootScope.isAnnotaionToolBarDrawingModeActive = false;
595   -
596   - $rootScope.switchCanvas();
  602 +
  603 + if ($("#transparencyScale").css("display") == "block") {
  604 + $rootScope.switchToTransparencycanvas();
  605 + }
  606 + else
  607 + {
  608 + $rootScope.switchCanvas();
  609 + }
597 610 $rootScope.shapeType = '';
598 611 }
599 612 $rootScope.CIAnotationIdentifyModeOff = false;
... ... @@ -623,9 +636,33 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
623 636  
624 637 $rootScope.isAnnotaionToolBarDrawingModeActive = false;
625 638 $rootScope.switchCanvas();
  639 +
  640 + if ($("#transparencyScale").css("display") == "block") {
  641 +
  642 + $rootScope.switchToTransparencycanvas();
  643 + }
  644 +
626 645 }
627 646  
  647 + $rootScope.switchToTransparencycanvas = function () {
628 648  
  649 + var x = $("#canvas").css("z-index");
  650 + var y = $("#canvasPaint").css("z-index");
  651 + x = parseInt(x) + 1;
  652 + y = parseInt(y) + 1;
  653 + if (x > y) {
  654 + $(".ui-wrapper").css("z-index", x);
  655 + $("#canvas").css("z-index", x);
  656 + $rootScope.UIWrapperZIndex = x;
  657 +
  658 + }
  659 + else {
  660 + $(".ui-wrapper").css("z-index", y);
  661 + $("#canvas").css("z-index", y);
  662 + $rootScope.UIWrapperZIndex = y;
  663 + }
  664 +
  665 + }
629 666  
630 667 $rootScope.DrawingMode = function () {
631 668 //Annotation History
... ... @@ -637,9 +674,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
637 674 $("#annotationpaintbrushsize").removeClass("activebtncolor");
638 675 $("#annotationpainteraser").removeClass("activebtncolor");
639 676 $rootScope.isEraseToolSelected = false;
640   - // $("#canvasPaint").css("display", "block");
641   - // $("#canvas").css("display", "block");
642   -
643 677 }
644 678  
645 679 // Dissectible Anatomy > Settings should be disable if Annotation is Open.
... ... @@ -1923,6 +1957,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1923 1957 height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
1924 1958 resizeFromCenter: false,
1925 1959 click: function (layer) {
  1960 +
1926 1961 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
1927 1962 //jcanvas property
1928 1963 layer.draggable = true;
... ... @@ -1942,8 +1977,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1942 1977 strokeWidth: 2,
1943 1978 width: 5, height: 5,
1944 1979 cornerRadius: 3
  1980 +
1945 1981 }
1946 1982 }).drawLayers();
  1983 +
1947 1984 }
1948 1985 else {
1949 1986 //jcanvas property
... ... @@ -2093,6 +2130,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2093 2130  
2094 2131 },
2095 2132 mouseout: function (layer) {
  2133 +
2096 2134 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
2097 2135 //jcanvas property
2098 2136 layer.draggable = true;
... ... @@ -2105,6 +2143,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2105 2143 strokeWidth: 0,
2106 2144 width: 0, height: 0,
2107 2145 cornerRadius: 0
  2146 +
2108 2147 }
2109 2148 }).drawLayers();
2110 2149 }
... ... @@ -2112,6 +2151,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2112 2151 //jcanvas property
2113 2152 layer.draggable = false;
2114 2153 }
  2154 +
2115 2155 },
2116 2156 mouseover: function (layer) {
2117 2157 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
... ... @@ -2125,6 +2165,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2125 2165 strokeWidth: 2,
2126 2166 width: 5, height: 5,
2127 2167 cornerRadius: 3
  2168 +
2128 2169 }
2129 2170 }).drawLayers();
2130 2171 }
... ... @@ -2151,7 +2192,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2151 2192 maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
2152 2193 maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
2153 2194 add: function (layer) {
2154   -
  2195 +
2155 2196 //$rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' });
2156 2197 $rootScope.TextPropertyArray.push({ layerName: layer.name, Rect_Text: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily, TextDecoration: $rootScope.underlineText });
2157 2198 }
... ... @@ -2207,7 +2248,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2207 2248 $rootScope.resetTextSave = $rootScope.ObjectIndexSave++;
2208 2249  
2209 2250 // generating new text area
2210   - $('#canvas')
  2251 + // $('#canvas')
2211 2252 // Draw rect as wide as the text
2212 2253 $('#canvas').drawRect({
2213 2254 name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave,
... ... @@ -2224,6 +2265,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2224 2265 width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
2225 2266 height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
2226 2267 resizeFromCenter: false,
  2268 +
2227 2269 click: function (layer) {
2228 2270 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
2229 2271 //jcanvas property
... ... @@ -2364,11 +2406,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2364 2406 cornerRadius: 0
2365 2407 }
2366 2408 }).drawLayers();
  2409 +
2367 2410 }
2368 2411 else {
2369 2412 //jcanvas property
2370 2413 layer.draggable = false;
2371 2414 }
  2415 +
2372 2416 },
2373 2417 mouseover: function (layer) {
2374 2418 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
... ... @@ -2392,7 +2436,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2392 2436 layer.draggable = false;
2393 2437 }
2394 2438 }
2395   -
  2439 +
2396 2440 }).drawText({
2397 2441 layer: true,
2398 2442 draggable: true,
... ...