Commit fba72f100c29d035ab6ec0b6cdbcb7c057baf130

Authored by Birendra
1 parent 879a8420

updating da selection issue

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -455,6 +455,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -455,6 +455,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
455 $('#CBDetailPageDiv').css('pointer-events', 'auto'); 455 $('#CBDetailPageDiv').css('pointer-events', 'auto');
456 $('#CBDetailPageDiv').css('opacity', '1'); 456 $('#CBDetailPageDiv').css('opacity', '1');
457 } 457 }
  458 + //fixing for mac os now
  459 + $scope.getOS = function () {
  460 + var userAgent = window.navigator.userAgent,
  461 + platform = window.navigator.platform,
  462 + macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'],
  463 + windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],
  464 + iosPlatforms = ['iPhone', 'iPad', 'iPod'],
  465 + os = null;
  466 +
  467 + if (macosPlatforms.indexOf(platform) !== -1) {
  468 + os = 'MacOS';
  469 + } else if (iosPlatforms.indexOf(platform) !== -1) {
  470 + os = 'iOS';
  471 + } else if (windowsPlatforms.indexOf(platform) !== -1) {
  472 + os = 'Windows';
  473 + } else if (/Android/.test(userAgent)) {
  474 + os = 'Android';
  475 + } else if (!os && /Linux/.test(platform)) {
  476 + os = 'Linux';
  477 + }
  478 +
  479 + return os;
  480 + }
  481 +
458 482
459 $scope.openView = function ($event) { 483 $scope.openView = function ($event) {
460 // open module bu openresource 484 // open module bu openresource
@@ -2530,8 +2554,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -2530,8 +2554,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2530 2554
2531 2555
2532 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); 2556 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
2533 - var verticalScrollPosition = canvasDiv.scrollTop;  
2534 - var horizontlScrollPosition = canvasDiv.scrollLeft; 2557 +
  2558 + //changing for mac os now
  2559 + var os=$scope.getOS();
  2560 + if(os=='MacOS')
  2561 + {
  2562 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  2563 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  2564 + }
  2565 + else
  2566 + {
  2567 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  2568 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  2569 + }
2535 2570
2536 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135); 2571 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
2537 2572
@@ -3057,14 +3092,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3057,14 +3092,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3057 // alert(mousePos.x + ',' + mousePos.y); 3092 // alert(mousePos.x + ',' + mousePos.y);
3058 3093
3059 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); 3094 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
3060 - var verticalScrollPosition = canvasDiv.scrollTop;  
3061 - var horizontlScrollPosition = canvasDiv.scrollLeft;  
3062 -  
3063 - 3095 + //changing for mac os now
  3096 + var os=$scope.getOS();
  3097 + if(os=='MacOS')
  3098 + {
  3099 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  3100 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  3101 + }
  3102 + else
  3103 + {
  3104 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  3105 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  3106 + }
  3107 +
3064 //We substracted 135, as the difference between flex and html coordinates for same organ is 135 3108 //We substracted 135, as the difference between flex and html coordinates for same organ is 135
3065 - var actulalX = mousePos.x + Math.round(horizontlScrollPosition)-1;  
3066 - var actualY = mousePos.y + Math.round(verticalScrollPosition)-1;  
3067 - var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y); 3109 +
  3110 + var actulalX = mousePos.x + horizontlScrollPosition;
  3111 + var actualY = mousePos.y + verticalScrollPosition;
  3112 +
  3113 + var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, x, y);
3068 3114
3069 3115
3070 //Modesty ON 3116 //Modesty ON
@@ -5001,7 +5047,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -5001,7 +5047,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
5001 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) { 5047 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) {
5002 if ( $scope.speechbubbleList[m].ids == sub_id1) { 5048 if ( $scope.speechbubbleList[m].ids == sub_id1) {
5003 5049
5004 - $scope.angle1( $scope.speechbubbleList[m].xaxis-1, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id); 5050 + $scope.angle1($scope.speechbubbleList[m].xaxis, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id);
5005 break; 5051 break;
5006 } 5052 }
5007 } 5053 }
@@ -5090,7 +5136,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5090,7 +5136,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5090 5136
5091 var verticalScrollPosition = canvasDiv.scrollTop; 5137 var verticalScrollPosition = canvasDiv.scrollTop;
5092 var horizontlScrollPosition = canvasDiv.scrollLeft; 5138 var horizontlScrollPosition = canvasDiv.scrollLeft;
5093 - $scope.angle(x-1, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid); 5139 + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid);
5094 }, 5140 },
5095 //Update Annotation Cordianate in case of show single Annotation 5141 //Update Annotation Cordianate in case of show single Annotation
5096 stop: function (evt) { 5142 stop: function (evt) {
@@ -5173,7 +5219,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5173,7 +5219,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5173 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { 5219 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) {
5174 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) { 5220 for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) {
5175 if ( $scope.speechbubbleList[m].ids == sub_id1_anno) { 5221 if ( $scope.speechbubbleList[m].ids == sub_id1_anno) {
5176 - $scope.angle1( $scope.speechbubbleList[m].xaxis-1, $scope.speechbubbleList[m].yaxis-1, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id_anno); 5222 + $scope.angle1($scope.speechbubbleList[m].xaxis, $scope.speechbubbleList[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, bor_id_anno);
5177 break; 5223 break;
5178 } 5224 }
5179 } 5225 }
@@ -5270,7 +5316,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5270,7 +5316,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5270 var canvasDiv = document.getElementById('canvasDivDA_' + windid); 5316 var canvasDiv = document.getElementById('canvasDivDA_' + windid);
5271 var verticalScrollPosition = canvasDiv.scrollTop; 5317 var verticalScrollPosition = canvasDiv.scrollTop;
5272 var horizontlScrollPosition = canvasDiv.scrollLeft; 5318 var horizontlScrollPosition = canvasDiv.scrollLeft;
5273 - $scope.angle(x-1, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, false,windid); 5319 + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, false,windid);
5274 }, 5320 },
5275 5321
5276 //Update Annotation Cordianate in case of show single Annotation 5322 //Update Annotation Cordianate in case of show single Annotation
@@ -5434,13 +5480,29 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5434,13 +5480,29 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5434 5480
5435 $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id, tipx, tipy,windowviewid,speechBubbleCounter) { 5481 $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id, tipx, tipy,windowviewid,speechBubbleCounter) {
5436 var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData'); 5482 var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
5437 - if (isHighlightBodyWithCBTermData == true) {  
5438 -  
5439 - var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 5) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + 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:" + (tipx-4) + "px;top:" + tipy + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>";  
5440 - }  
5441 - else {  
5442 - var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 5) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + 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-4) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>";  
5443 - } 5483 + var os=$scope.getOS();
  5484 + if(os=='MacOS')
  5485 + {
  5486 + if (isHighlightBodyWithCBTermData == true) {
  5487 + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 3) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + 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:" + (tipx-3) + "px;top:" + tipy + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>";
  5488 + }
  5489 + else
  5490 + {
  5491 + var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 3) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + 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-3) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>";
  5492 + }
  5493 + }
  5494 + else
  5495 + {
  5496 + if (isHighlightBodyWithCBTermData == true) {
  5497 + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000; left:" + (x - 4) + "px;top:" + (y + 11.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + 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:" + (tipx-4) + "px;top:" + tipy + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter+"_" + windowviewid+ "'></div></div>";
  5498 + }
  5499 + else
  5500 + {
  5501 + var sppechBubbleHTML = "<div id ='" + pointClicked +"' class='com_" + windowviewid+"'><div class='multiLineAnnotation' style=' z-index:60000; left:" + (x - 4) + "px;top:" + (y + 11.5) + "px;'' id='bubble" + speechBubbleCounter +"_" + windowviewid+ "'></div><div data=" + 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-4) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + speechBubbleCounter + " class='dynCross_" + windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + speechBubbleCounter +"_" + windowviewid+ "'></div></div>";
  5502 + }
  5503 + }
  5504 +
  5505 +
5444 5506
5445 //Issue #7286 :Undefined annotation should not appear 5507 //Issue #7286 :Undefined annotation should not appear
5446 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { 5508 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
@@ -5522,22 +5584,51 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5522,22 +5584,51 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5522 } 5584 }
5523 var Globe = []; 5585 var Globe = [];
5524 Globe.push({ currentX: x, currentY: y }); 5586 Globe.push({ currentX: x, currentY: y });
5525 - document.getElementById('dot_'+windowviewid).style.display = 'block';  
5526 - document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 5) + 'px'; 5587 +
  5588 + //changing for mac os now
  5589 + var os=$scope.getOS();
  5590 + if(os=='MacOS')
  5591 + {
  5592 + document.getElementById('dot_'+windowviewid).style.display = 'block';
  5593 + document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
5527 document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px'; 5594 document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px';
5528 document.getElementById('bord_'+windowviewid).style.display = 'block'; 5595 document.getElementById('bord_'+windowviewid).style.display = 'block';
5529 - document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 1) + 'px'; 5596 + document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
5530 document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 0) + 'px'; 5597 document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 0) + 'px';
5531 5598
5532 document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block'; 5599 document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block';
5533 - document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = ((Globe[0].currentX) - 2) + 'px';  
5534 - document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px'; 5600 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = ((Globe[0].currentX) - 1) + 'px';
  5601 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY)+0) + 'px';
  5602 + }
  5603 + else
  5604 + {
  5605 + document.getElementById('dot_'+windowviewid).style.display = 'block';
  5606 + document.getElementById('dot_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5607 + document.getElementById('dot_'+windowviewid).style.top = ((Globe[0].currentY) + 11.5) + 'px';
  5608 + document.getElementById('bord_'+windowviewid).style.display = 'block';
  5609 + document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
  5610 + document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px';
  5611 +
  5612 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block';
  5613 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = ((Globe[0].currentX) - 1) + 'px';
  5614 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY)-1) + 'px';
  5615 +
  5616 + }
5535 } 5617 }
5536 5618
5537 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation, windowviewid, TPspeechBubbleCounter) { 5619 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation, windowviewid, TPspeechBubbleCounter) {
5538 5620
5539 - var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 5) + "px;top:" + (y + 9) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " 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-4) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";  
5540 - if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { 5621 + var os=$scope.getOS();
  5622 + if(os=='MacOS')
  5623 + {
  5624 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 3) + "px;top:" + (y + 10.5) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " 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-3) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";
  5625 + }
  5626 + else
  5627 + {
  5628 + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div class='multiLineAnnotation' style='z-index:60000;left:" + (x - 4) + "px;top:" + (y + 11.5) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " 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-4) + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";
  5629 + }
  5630 +
  5631 + if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
5541 if (Exists_annotation == 0) { 5632 if (Exists_annotation == 0) {
5542 $('#canvasDivDA_' + windowviewid).append(sppechBubbleHTML_annotation); 5633 $('#canvasDivDA_' + windowviewid).append(sppechBubbleHTML_annotation);
5543 for (var l = 0; l <= $scope.annotationTextArrayT1.length - 1; l++) { 5634 for (var l = 0; l <= $scope.annotationTextArrayT1.length - 1; l++) {
@@ -5638,15 +5729,34 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5638,15 +5729,34 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5638 } 5729 }
5639 var Globe = []; 5730 var Globe = [];
5640 Globe.push({ currentX: x, currentY: y }); 5731 Globe.push({ currentX: x, currentY: y });
5641 - document.getElementById('dot_annotation_'+windowviewid).style.display = 'block';  
5642 - document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 5) + 'px';  
5643 - document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px';  
5644 - document.getElementById('bord_annotation_'+windowviewid).style.display = 'block';  
5645 - document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 1) + 'px';  
5646 - document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY)) + 'px';  
5647 - document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block';  
5648 - document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX-2) + 'px';  
5649 - document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px'; 5732 + //changing for mac os now
  5733 + var os=$scope.getOS();
  5734 + if(os=='MacOS')
  5735 + {
  5736 + document.getElementById('dot_annotation_'+windowviewid).style.display = 'block';
  5737 + document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5738 + document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 10.5) + 'px';
  5739 + document.getElementById('bord_annotation_'+windowviewid).style.display = 'block';
  5740 + document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
  5741 + document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 0) + 'px';
  5742 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block';
  5743 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX - 1) + 'px';
  5744 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY) + 0) + 'px';
  5745 +
  5746 + }
  5747 + else
  5748 + {
  5749 + document.getElementById('dot_annotation_'+windowviewid).style.display = 'block';
  5750 + document.getElementById('dot_annotation_'+windowviewid).style.left = ((Globe[0].currentX) - 4) + 'px';
  5751 + document.getElementById('dot_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 11.5) + 'px';
  5752 + document.getElementById('bord_annotation_'+windowviewid).style.display = 'block';
  5753 + document.getElementById('bord_annotation_'+windowviewid).style.left = ((Globe[0].currentX) + 0.5) + 'px';
  5754 + document.getElementById('bord_annotation_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px';
  5755 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.display = 'block';
  5756 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX - 1) + 'px';
  5757 + document.getElementById('sppeachBubble_annotation_' + windowviewid + '-' + termNumber).style.top = ((Globe[0].currentY) - 1) + 'px';
  5758 + }
  5759 +
5650 5760
5651 } 5761 }
5652 5762
@@ -6147,6 +6257,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -6147,6 +6257,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6147 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex')); 6257 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
6148 $(".ui-wrapper").css("left",TransparencyBoxStartX-2+ 'px'); 6258 $(".ui-wrapper").css("left",TransparencyBoxStartX-2+ 'px');
6149 6259
  6260 +
6150 } 6261 }
6151 6262
6152 var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData'); 6263 var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData');
@@ -6436,7 +6547,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -6436,7 +6547,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6436 transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener); 6547 transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
6437 6548
6438 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex')); 6549 $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex'));
6439 - 6550 + $(".ui-wrapper").css("left",$scope.startX-2+ 'px');
6440 } 6551 }
6441 6552
6442 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { 6553 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
@@ -7629,13 +7740,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7629,13 +7740,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7629 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid); 7740 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
7630 7741
7631 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid); 7742 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
7632 - var verticalScrollPosition = canvasDiv.scrollTop;  
7633 - var horizontlScrollPosition = canvasDiv.scrollLeft; 7743 + //changing for mac os now
  7744 + var os=$scope.getOS();
  7745 + if(os=='MacOS')
  7746 + {
  7747 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  7748 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  7749 + }
  7750 + else
  7751 + {
  7752 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  7753 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  7754 + }
7634 7755
7635 7756
7636 //We substracted 135, as the difference between flex and html coordinates for same organ is 135 7757 //We substracted 135, as the difference between flex and html coordinates for same organ is 135
7637 - var actulalX = mousePos.x + Math.round(horizontlScrollPosition)-1;  
7638 - var actualY = mousePos.y + Math.round(verticalScrollPosition)-1; 7758 + var actulalX = mousePos.x + horizontlScrollPosition;
  7759 + var actualY = mousePos.y + verticalScrollPosition;
7639 var clickedBodyRegion; 7760 var clickedBodyRegion;
7640 var x; 7761 var x;
7641 var y; 7762 var y;
@@ -7811,8 +7932,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7811,8 +7932,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7811 var tCanvasTotalHeight = parseInt(tCanvasTopAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]); 7932 var tCanvasTotalHeight = parseInt(tCanvasTopAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]);
7812 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid); 7933 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
7813 var canvasDiv = document.getElementById('canvasDivDA_'+windowviewid); 7934 var canvasDiv = document.getElementById('canvasDivDA_'+windowviewid);
7814 - var verticalScrollPosition = canvasDiv.scrollTop;  
7815 - var horizontlScrollPosition = canvasDiv.scrollLeft; 7935 + //changing for mac os now
  7936 + var os=$scope.getOS();
  7937 + if(os=='MacOS')
  7938 + {
  7939 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  7940 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  7941 + }
  7942 + else
  7943 + {
  7944 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  7945 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  7946 + }
7816 7947
7817 var actulalX = mousePos.x + horizontlScrollPosition; 7948 var actulalX = mousePos.x + horizontlScrollPosition;
7818 var actualY = mousePos.y + verticalScrollPosition; 7949 var actualY = mousePos.y + verticalScrollPosition;
@@ -7891,8 +8022,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7891,8 +8022,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7891 var windowviewid = (evt.target.id).split("_")[len-1]; 8022 var windowviewid = (evt.target.id).split("_")[len-1];
7892 8023
7893 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); 8024 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
7894 - var verticalScrollPosition = canvasDiv.scrollTop;  
7895 - var horizontlScrollPosition = canvasDiv.scrollLeft; 8025 + //changing for mac os now
  8026 + var os=$scope.getOS();
  8027 + if(os=='MacOS')
  8028 + {
  8029 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  8030 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  8031 + }
  8032 + else
  8033 + {
  8034 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  8035 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  8036 + }
7896 8037
7897 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135); 8038 var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
7898 8039
@@ -7953,8 +8094,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7953,8 +8094,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7953 $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false); 8094 $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
7954 } 8095 }
7955 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); 8096 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
7956 - var verticalScrollPosition = canvasDiv.scrollTop;  
7957 - var horizontlScrollPosition = canvasDiv.scrollLeft; 8097 + //changing for mac os now
  8098 + var os=$scope.getOS();
  8099 + if(os=='MacOS')
  8100 + {
  8101 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-2;
  8102 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-2;
  8103 + }
  8104 + else
  8105 + {
  8106 + var verticalScrollPosition = Math.round(canvasDiv.scrollTop)-1;
  8107 + var horizontlScrollPosition = Math.round(canvasDiv.scrollLeft)-1;
  8108 + }
7958 var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData'); 8109 var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
7959 CurriculumTermData.push({ 8110 CurriculumTermData.push({
7960 "transparentTermNumber": parseInt($scope.TBoxTermNumber), 8111 "transparentTermNumber": parseInt($scope.TBoxTermNumber),
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -1089,7 +1089,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -1089,7 +1089,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1089 //added by birendra direct open CA module 1089 //added by birendra direct open CA module
1090 if(paramInfo[0].toLowerCase() == 'mtype') 1090 if(paramInfo[0].toLowerCase() == 'mtype')
1091 { 1091 {
1092 - $rootScope.siteUrlInfo.mtype = paramInfo[1]; 1092 + // $rootScope.siteUrlInfo.mtype = paramInfo[1];
1093 console.log("$rootScope.siteUrlInfo.mtype" + $rootScope.siteUrlInfo.mtype); 1093 console.log("$rootScope.siteUrlInfo.mtype" + $rootScope.siteUrlInfo.mtype);
1094 } 1094 }
1095 else if (paramInfo[0].toLowerCase() == 'id') { 1095 else if (paramInfo[0].toLowerCase() == 'id') {
@@ -1161,32 +1161,32 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -1161,32 +1161,32 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1161 } 1161 }
1162 } 1162 }
1163 if (isCalsCredantialForSIte == "True") { 1163 if (isCalsCredantialForSIte == "True") {
1164 - if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.userId!=null && $rootScope.siteUrlInfo.accountNumber!=null)  
1165 - {  
1166 - AuthenticationService.ByPassLoginToOpenModule($rootScope.siteUrlInfo)  
1167 - .then(  
1168 - function (result) {  
1169 - if(result!=null)  
1170 - {  
1171 - $rootScope.userInfo.username = result.userId;  
1172 - $rootScope.userInfo.password = result.password;  
1173 - $rootScope.AuthenticateUser($rootScope.userInfo);  
1174 - }  
1175 -  
1176 - }),  
1177 - function (error) {  
1178 - console.log(' Error in bypass login = ' + error.statusText);  
1179 - $rootScope.errorMessage = error;  
1180 - $("#messageModal").modal('show');  
1181 - }  
1182 -  
1183 - }  
1184 - else  
1185 - {  
1186 - console.log(' invalid detail in bypass login');  
1187 - $rootScope.errorMessage = "authentication is not allowed due to invalid details format .\nPlease pass the correct details again!";  
1188 - $("#messageModal").modal('show');  
1189 - } 1164 + // if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca' && $rootScope.siteUrlInfo.userId!=null && $rootScope.siteUrlInfo.accountNumber!=null)
  1165 + // {
  1166 + // AuthenticationService.ByPassLoginToOpenModule($rootScope.siteUrlInfo)
  1167 + // .then(
  1168 + // function (result) {
  1169 + // if(result!=null)
  1170 + // {
  1171 + // $rootScope.userInfo.username = result.userId;
  1172 + // $rootScope.userInfo.password = result.password;
  1173 + // $rootScope.AuthenticateUser($rootScope.userInfo);
  1174 + // }
  1175 +
  1176 + // }),
  1177 + // function (error) {
  1178 + // console.log(' Error in bypass login = ' + error.statusText);
  1179 + // $rootScope.errorMessage = error;
  1180 + // $("#messageModal").modal('show');
  1181 + // }
  1182 +
  1183 + // }
  1184 + // else
  1185 + // {
  1186 + // console.log(' invalid detail in bypass login');
  1187 + // $rootScope.errorMessage = "authentication is not allowed due to invalid details format .\nPlease pass the correct details again!";
  1188 + // $("#messageModal").modal('show');
  1189 + // }
1190 1190
1191 } 1191 }
1192 else { 1192 else {