Commit 9a0eef143889cb5fbea2a62c3768dda761c29fdb

Authored by Birendra
1 parent cd18328f

fixing DA selection issue for macOS

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -315,6 +315,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
315 315 $('#spinner').css('visibility', 'hidden');
316 316 }
317 317  
  318 + //fixing for mac os now
  319 + $scope.getOS = function () {
  320 + var userAgent = window.navigator.userAgent,
  321 + platform = window.navigator.platform,
  322 + macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'],
  323 + windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],
  324 + iosPlatforms = ['iPhone', 'iPad', 'iPod'],
  325 + os = null;
  326 +
  327 + if (macosPlatforms.indexOf(platform) !== -1) {
  328 + os = 'MacOS';
  329 + } else if (iosPlatforms.indexOf(platform) !== -1) {
  330 + os = 'iOS';
  331 + } else if (windowsPlatforms.indexOf(platform) !== -1) {
  332 + os = 'Windows';
  333 + } else if (/Android/.test(userAgent)) {
  334 + os = 'Android';
  335 + } else if (!os && /Linux/.test(platform)) {
  336 + os = 'Linux';
  337 + }
  338 +
  339 + return os;
  340 + }
  341 +
318 342 $scope.openView = function ($event) {
319 343  
320 344 $rootScope.disableAnnotationTB = false;
... ... @@ -1697,7 +1721,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1697 1721 $scope.isLayerChange = false;
1698 1722 }
1699 1723  
1700   - if (evt.ctrlKey) {
  1724 + // for mac os Command key use for multi selection
  1725 + if (evt.ctrlKey || evt.metaKey) {
1701 1726 $rootScope.multiAnnotationIsON = true;
1702 1727  
1703 1728 //document.getElementById("btnZoom").setAttribute('disabled', 'disabled');
... ... @@ -1728,9 +1753,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1728 1753  
1729 1754  
1730 1755 var canvasDiv = document.getElementById('canvasDiv');
1731   - var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
1732   - var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
1733   -
  1756 + //changing for mac os now
  1757 + var os=$scope.getOS();
  1758 + if(os=='MacOS')
  1759 + {
  1760 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  1761 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  1762 + }
  1763 + else
  1764 + {
  1765 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  1766 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  1767 + }
  1768 +
1734 1769 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
1735 1770  
1736 1771 var mirrorXOnNormalImage = parseInt(maskCanvasContext.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage);
... ... @@ -2116,8 +2151,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2116 2151 if ($scope.isLayerChange == true) {
2117 2152 $scope.isLayerChange = false;
2118 2153 }
2119   -
2120   - if (evt.ctrlKey) {
  2154 + //birendra
  2155 + // for mac os Command key use for multi selection
  2156 + if (evt.ctrlKey || evt.metaKey) {
2121 2157 $rootScope.multiAnnotationIsON = true;
2122 2158  
2123 2159 //$("#btnZoom").addClass('disabled');
... ... @@ -2158,13 +2194,23 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2158 2194 // alert(mousePos.x + ',' + mousePos.y);
2159 2195  
2160 2196 var canvasDiv = document.getElementById('canvasDiv');
2161   - var verticalScrollPosition = canvasDiv.scrollTop;
2162   - var horizontlScrollPosition = canvasDiv.scrollLeft;
2163   -
  2197 + //changing for mac os now
  2198 + var os=$scope.getOS();
  2199 + if(os=='MacOS')
  2200 + {
  2201 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  2202 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  2203 + }
  2204 + else
  2205 + {
  2206 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  2207 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  2208 + }
  2209 +
2164 2210  
2165 2211 //We substracted 135, as the difference between flex and html coordinates for same organ is 135
2166   - var actulalX = mousePos.x + Math.round(horizontlScrollPosition)-1;
2167   - var actualY = mousePos.y + Math.round(verticalScrollPosition)-1;
  2212 + var actulalX = mousePos.x + horizontlScrollPosition;
  2213 + var actualY = mousePos.y + verticalScrollPosition;
2168 2214 var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
2169 2215  
2170 2216  
... ... @@ -3870,7 +3916,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3870 3916 // we decide the size of speech bubble
3871 3917 //2.
3872 3918  
3873   - if (event.ctrlKey) {
  3919 + if (event.ctrlKey || event.metaKey) {
3874 3920 console.log('ctrl pressed');
3875 3921 $scope.multiAnnotationIsON = true;
3876 3922 //2.1 create unique speech bubbles
... ... @@ -3896,7 +3942,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3896 3942 if ($scope.speechbubbleList != null || $scope.speechbubbleList != undefined) {
3897 3943 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) {
3898 3944 if ($scope.speechbubbleList[m].ids == sub_id1) {
3899   - $scope.angle1($scope.speechbubbleList[m].xaxis-0.5, $scope.speechbubbleList[m].yaxis-0.5, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, bor_id);
  3945 + $scope.angle1($scope.speechbubbleList[m].xaxis, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, bor_id);
3900 3946 break;
3901 3947 }
3902 3948 }
... ... @@ -3926,7 +3972,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3926 3972 $("#dot").css("visibility", "hidden");
3927 3973 var verticalScrollPosition = canvasDiv.scrollTop;
3928 3974 var horizontlScrollPosition = canvasDiv.scrollLeft;
3929   - $scope.angle(x-0.5, y-0.5, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
  3975 + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
3930 3976 },
3931 3977 });
3932 3978 $('.crossDiv_temp').on('click', function (evt) {
... ... @@ -3939,7 +3985,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3939 3985 else {
3940 3986 $scope.longest_annotationT1 = $scope.annotationTextArrayT1.reduce(function (a, b) { return a.length > b.length ? a : b; });
3941 3987 $scope.longest_annotationT2 = $scope.annotationTextArrayT2.reduce(function (a, b) { return a.length > b.length ? a : b; });
3942   - if (event.ctrlKey) {
  3988 + if (event.ctrlKey || event.metaKey) {
3943 3989 $scope.j = $scope.j + 1;
3944 3990 var sub_id_annotation = "black_annotation" + $scope.j;
3945 3991 var pointClicked_annotation = parseInt(x) + parseInt(y);
... ... @@ -3956,7 +4002,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3956 4002 if ($scope.speachBubbleArrayAnnotation != null || $scope.speachBubbleArrayAnnotation != undefined) {
3957 4003 for (var m = 0; m <= $scope.speachBubbleArrayAnnotation.length - 1; m++) {
3958 4004 if ($scope.speachBubbleArrayAnnotation[m].ids == sub_id1_anno) {
3959   - $scope.angle1($scope.speachBubbleArrayAnnotation[m].xaxis-0.5, $scope.speachBubbleArrayAnnotation[m].yaxis-0.5, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, bor_id_anno);
  4005 + $scope.angle1($scope.speachBubbleArrayAnnotation[m].xaxis, $scope.speachBubbleArrayAnnotation[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, bor_id_anno);
3960 4006 break;
3961 4007 }
3962 4008 }
... ... @@ -3979,7 +4025,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3979 4025 $("#dot_annotation").remove();
3980 4026 var verticalScrollPosition = canvasDiv.scrollTop;
3981 4027 var horizontlScrollPosition = canvasDiv.scrollLeft;
3982   - $scope.angle(x-0.5, y-0.5, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
  4028 + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
3983 4029 },
3984 4030 });
3985 4031 $('.crossDiv_temp_annotation').on('click', function (evt) {
... ... @@ -4030,7 +4076,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4030 4076 }
4031 4077  
4032 4078 $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) {
4033   - var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 5) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>";
  4079 + var os=$scope.getOS();
  4080 + if(os=='MacOS')
  4081 + {
  4082 + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 3) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>";
  4083 + }
  4084 + else
  4085 + {
  4086 + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 4) + "px;top:" + (y + 11.5) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>";
  4087 + }
4034 4088 //Issue #7286 :Undefined annotation should not appear
4035 4089 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
4036 4090 var annotation = $scope.MultiLanguageAnnationArray[i];
... ... @@ -4162,22 +4216,46 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4162 4216 }
4163 4217 var Globe = [];
4164 4218 Globe.push({ currentX: x, currentY: y });
  4219 + //changing for mac os now
  4220 + var os=$scope.getOS();
  4221 + if(os=='MacOS')
  4222 + {
4165 4223 document.getElementById('dot').style.display = 'block';
4166   - document.getElementById('dot').style.left = ((Globe[0].currentX) - 5) + 'px';
4167   - document.getElementById('dot').style.top = ((Globe[0].currentY) + 10) + 'px';
  4224 + document.getElementById('dot').style.left = ((Globe[0].currentX) - 4) + 'px';
  4225 + document.getElementById('dot').style.top = ((Globe[0].currentY) + 10.5) + 'px';
4168 4226 document.getElementById('bord').style.display = 'block';
4169   - document.getElementById('bord').style.left = ((Globe[0].currentX) - 1) + 'px';
  4227 + document.getElementById('bord').style.left = ((Globe[0].currentX) + 0.5) + 'px';
4170 4228 document.getElementById('bord').style.top = ((Globe[0].currentY) + 0) + 'px';
4171 4229 document.getElementById('sppeachBubble').style.display = 'block';
4172   - document.getElementById('sppeachBubble').style.left = (Globe[0].currentX) + 'px';
4173   - document.getElementById('sppeachBubble').style.top = (Globe[0].currentY) + 'px';
4174   -
4175   -
  4230 + document.getElementById('sppeachBubble').style.left = ((Globe[0].currentX) - 1) + 'px';
  4231 + document.getElementById('sppeachBubble').style.top = ((Globe[0].currentY)+0) + 'px';
  4232 + }
  4233 + else
  4234 + {
  4235 + document.getElementById('dot').style.display = 'block';
  4236 + document.getElementById('dot').style.left = ((Globe[0].currentX) - 4) + 'px';
  4237 + document.getElementById('dot').style.top = ((Globe[0].currentY) + 11.5) + 'px';
  4238 + document.getElementById('bord').style.display = 'block';
  4239 + document.getElementById('bord').style.left = ((Globe[0].currentX) + 0.5) + 'px';
  4240 + document.getElementById('bord').style.top = ((Globe[0].currentY) + 1) + 'px';
  4241 + document.getElementById('sppeachBubble').style.display = 'block';
  4242 + document.getElementById('sppeachBubble').style.left = ((Globe[0].currentX) - 1) + 'px';
  4243 + document.getElementById('sppeachBubble').style.top = ((Globe[0].currentY)-1) + 'px';
4176 4244  
  4245 + }
  4246 +
4177 4247 }
4178 4248 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation) {
4179   -
4180   - var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div class='multiLineAnnotation' style='z-index:59000;left:" + (x - 5) + "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>";
  4249 + var os=$scope.getOS();
  4250 + if(os=='MacOS')
  4251 + {
  4252 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div class='multiLineAnnotation' style='z-index:59000;left:" + (x - 3) + "px;top:" + (y + 10.5) + "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>";
  4253 + }
  4254 + else
  4255 + {
  4256 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div class='multiLineAnnotation' style='z-index:59000;left:" + (x - 4) + "px;top:" + (y + 11.5) + "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>";
  4257 + }
  4258 +
4181 4259 if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
4182 4260 if (Exists_annotation == 0) {
4183 4261 $("#canvasDiv").append(sppechBubbleHTML_annotation);
... ... @@ -4363,15 +4441,34 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4363 4441 }
4364 4442 var Globe = [];
4365 4443 Globe.push({ currentX: x, currentY: y });
4366   - document.getElementById('dot_annotation').style.display = 'block';
4367   - document.getElementById('dot_annotation').style.left = ((Globe[0].currentX) - 5) + 'px';
4368   - document.getElementById('dot_annotation').style.top = ((Globe[0].currentY) + 10) + 'px';
4369   - document.getElementById('bord_annotation').style.display = 'block';
4370   - document.getElementById('bord_annotation').style.left = ((Globe[0].currentX) - 1) + 'px';
4371   - document.getElementById('bord_annotation').style.top = ((Globe[0].currentY) + 0) + 'px';
4372   - document.getElementById('sppeachBubble_annotation').style.display = 'block';
4373   - document.getElementById('sppeachBubble_annotation').style.left = (Globe[0].currentX) + 'px';
4374   - document.getElementById('sppeachBubble_annotation').style.top = (Globe[0].currentY) + 'px';
  4444 + //changing for mac os now
  4445 + var os=$scope.getOS();
  4446 + if(os=='MacOS')
  4447 + {
  4448 + document.getElementById('dot_annotation').style.display = 'block';
  4449 + document.getElementById('dot_annotation').style.left = ((Globe[0].currentX) - 4) + 'px';
  4450 + document.getElementById('dot_annotation').style.top = ((Globe[0].currentY) + 10.5) + 'px';
  4451 + document.getElementById('bord_annotation').style.display = 'block';
  4452 + document.getElementById('bord_annotation').style.left = ((Globe[0].currentX) + 0.5) + 'px';
  4453 + document.getElementById('bord_annotation').style.top = ((Globe[0].currentY) + 0) + 'px';
  4454 + document.getElementById('sppeachBubble_annotation').style.display = 'block';
  4455 + document.getElementById('sppeachBubble_annotation').style.left = (Globe[0].currentX - 1) + 'px';
  4456 + document.getElementById('sppeachBubble_annotation').style.top = ((Globe[0].currentY) + 0) + 'px';
  4457 +
  4458 + }
  4459 + else
  4460 + {
  4461 + document.getElementById('dot_annotation').style.display = 'block';
  4462 + document.getElementById('dot_annotation').style.left = ((Globe[0].currentX) - 4) + 'px';
  4463 + document.getElementById('dot_annotation').style.top = ((Globe[0].currentY) + 11.5) + 'px';
  4464 + document.getElementById('bord_annotation').style.display = 'block';
  4465 + document.getElementById('bord_annotation').style.left = ((Globe[0].currentX) + 0.5) + 'px';
  4466 + document.getElementById('bord_annotation').style.top = ((Globe[0].currentY) + 1) + 'px';
  4467 + document.getElementById('sppeachBubble_annotation').style.display = 'block';
  4468 + document.getElementById('sppeachBubble_annotation').style.left = (Globe[0].currentX - 1) + 'px';
  4469 + document.getElementById('sppeachBubble_annotation').style.top = ((Globe[0].currentY) - 1) + 'px';
  4470 +
  4471 + }
4375 4472  
4376 4473 }
4377 4474  
... ... @@ -6146,13 +6243,22 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6146 6243 // alert(mousePos.x + ',' + mousePos.y);
6147 6244  
6148 6245 var canvasDiv = document.getElementById('canvasDiv');
6149   - var verticalScrollPosition = canvasDiv.scrollTop;
6150   - var horizontlScrollPosition = canvasDiv.scrollLeft;
6151   -
  6246 + //changing for mac os now
  6247 + var os=$scope.getOS();
  6248 + if(os=='MacOS')
  6249 + {
  6250 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  6251 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  6252 + }
  6253 + else
  6254 + {
  6255 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  6256 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  6257 + }
6152 6258  
6153 6259 //We substracted 135, as the difference between flex and html coordinates for same organ is 135
6154   - var actulalX = mousePos.x + Math.round(horizontlScrollPosition)-1;
6155   - var actualY = mousePos.y + Math.round(verticalScrollPosition)-1; //- 135; //+ tomenuBarheight + titleBarheight + searchComboheight;
  6260 + var actulalX = mousePos.x + horizontlScrollPosition;
  6261 + var actualY = mousePos.y + verticalScrollPosition; //- 135; //+ tomenuBarheight + titleBarheight + searchComboheight;
6156 6262 var clickedBodyRegion;
6157 6263 var x;
6158 6264 var y;
... ... @@ -6354,9 +6460,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6354 6460 var tCanvasTotalHeight = parseInt(tCanvasTopAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]);
6355 6461 var mousePos = $scope.getMousePos(evt);
6356 6462 var canvasDiv = document.getElementById('canvasDiv');
6357   - var verticalScrollPosition = canvasDiv.scrollTop;
6358   - var horizontlScrollPosition = canvasDiv.scrollLeft;
6359   -
  6463 + //changing for mac os now
  6464 + var os=$scope.getOS();
  6465 + if(os=='MacOS')
  6466 + {
  6467 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  6468 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  6469 + }
  6470 + else
  6471 + {
  6472 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  6473 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  6474 + }
  6475 +
6360 6476 var actulalX = mousePos.x + horizontlScrollPosition;
6361 6477 var actualY = mousePos.y + verticalScrollPosition;
6362 6478  
... ... @@ -6455,9 +6571,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6455 6571  
6456 6572 function getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, maskCanvasContexttrans, clickedBodyRegion, x, y, evt) {
6457 6573 var canvasDiv = document.getElementById('canvasDiv');
6458   - var verticalScrollPosition = canvasDiv.scrollTop;
6459   - var horizontlScrollPosition = canvasDiv.scrollLeft;
6460   -
  6574 + //changing for mac os now
  6575 + var os=$scope.getOS();
  6576 + if(os=='MacOS')
  6577 + {
  6578 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  6579 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  6580 + }
  6581 + else
  6582 + {
  6583 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  6584 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  6585 + }
  6586 +
6461 6587 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
6462 6588  
6463 6589 var mirrorXOnNormalImage = parseInt(maskCanvasContexttrans.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage);
... ...