Commit cb71c688471ae1dd478965491826e0f2f399f07a

Authored by Amrita Vishnoi
2 parents 1461deb2 6782af94

merged SelectSystemPinIssue and

added some code manually as not merged automatically.
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -22,7 +22,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
22 22 $scope.AllBodySystem = [];
23 23 $scope.AllOrientation = [];
24 24 $scope.AllImageType = [];
25   - $rootScope.Globe1 = [];
  25 + $rootScope.speechBubbleDimaensions = [];
26 26  
27 27 $scope.query = {
28 28 selectedbodyregion: '',
... ... @@ -210,11 +210,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
210 210 .then(
211 211 function (result) {
212 212 $scope.aaPinData = result.data.Root.Item;
213   - angular.forEach($scope.aaPinData, function (value, key) {
  213 + if ($scope.aaPinData != null && $scope.aaPinData.length > 0) {
214 214  
215   - $scope.DrawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
216   - })
  215 + angular.forEach($scope.aaPinData, function (value, key) {
217 216  
  217 + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
  218 + })
  219 + }
218 220 },
219 221 function (error) {
220 222  
... ... @@ -425,53 +427,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
425 427  
426 428 $scope.showSelectedSystemPins = function (event) {
427 429  
428   - //1.Remove all the pins first
429   - $scope.ClearAllPins();
  430 + $scope.removeSpeechBubble();
  431 + if (event.currentTarget.id == "0") {
430 432  
431   - var selectedSystemName = event.currentTarget.title;
432   - //2. get pinData
433   - var promise = ModuleService.getPinDataForImage($rootScope.imageName)
  433 +
  434 + $scope.showAllPins();
434 435  
435   - .then(
436   - function (result) {
437   - $scope.aaPinData = result.data.Root.Item;
  436 + }
  437 + else {
438 438  
439   - //3. get termText info
440   - var promise = ModuleService.getTermTextForPin($scope.moduleName)
441   - .then(
442   - function (response) {
  439 + var selectedSystemName = event.currentTarget.title;
443 440  
444   - $scope.TermInfo = response.data.Terms.Term;
  441 +
  442 + // get termText info
  443 + var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
  444 + .then(
  445 + function (response) {
445 446  
446   - //on gettng all required data, draw pins
447   - var selectedSystemPinData = new jinqJs()
448   - .from($scope.aaPinData)
449   - .where("_BodySystemName == " + selectedSystemName)
450   - .select();
451   - angular.forEach(selectedSystemPinData, function (value, key) {
  447 + $scope.TermInfo = response.data.Terms.Term;
452 448  
453   -
454   - $scope.DrawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
  449 + //on gettng all required data, draw pins
  450 + if ($scope.aaPinData != null && $scope.aaPinData.length > 0) {
455 451  
456   - })
457   - //show annotation on first pin of the sysyem
458   - $scope.showAnnotation(selectedSystemPinData, false, false);
459   - },
460   - function (error) {
461   - // handle errors here
462   - console.log(' error: ' + error.statusText);
463   - }
464   - )
  452 + var selectedSystemPinData = new jinqJs()
  453 + .from($scope.aaPinData)
  454 + .where("_BodySystemName == " + selectedSystemName)
  455 + .select();
  456 + //remove other system pins
  457 + if (selectedSystemPinData != null && selectedSystemPinData.length > 0) {
465 458  
  459 + angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) {
466 460  
  461 + if (aaPinDataValue._BodySystemName != selectedSystemName)
  462 + $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId);
  463 + })
467 464  
468   - console.log(JSON.stringify(result, null, 4));
469   - },
470   - function (error) {
471   - // handle errors here
472   - console.log(' error: ' + error.statusText);
473   - }
474   - )
  465 + angular.forEach(selectedSystemPinData, function (value, key) {
  466 +
  467 +
  468 + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
  469 +
  470 + })
  471 + //show annotation on first pin of the sysyem
  472 + $scope.showAnnotation(selectedSystemPinData, false, false);
  473 + }
  474 + }
  475 + },
  476 + function (error) {
  477 + // handle errors here
  478 + console.log(' error: ' + error.statusText);
  479 + }
  480 + )
  481 +
  482 + }
475 483 }
476 484  
477 485 $scope.showAnnotation = function (selectedSystemPinData, isCtrlPressed, isPinClicked) {
... ... @@ -482,103 +490,110 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
482 490 var pinTermNumber = selectedSystemPinData[0]._TermId;
483 491  
484 492 //check if other pin have same termNumber
485   - var pinDataWithFirstTermNumber = new jinqJs()
486   - .from($scope.aaPinData)
487   - .where("_TermId == " + pinTermNumber)
488   - .select();
  493 + if ($scope.aaPinData != null && $scope.aaPinData.length > 0) {
489 494  
  495 + var pinDataWithFirstTermNumber = new jinqJs()
  496 + .from($scope.aaPinData)
  497 + .where("_TermId == " + pinTermNumber)
  498 + .select();
490 499  
491 500  
492   - //3. get termText info
493   - var promise = ModuleService.getTermTextForPin($scope.moduleName)
494   - .then(
495   - function (response) {
496 501  
497   - $scope.TermInfo = response.data.Terms.Term;
  502 + // get termText info
  503 + var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
  504 + .then(
  505 + function (response) {
498 506  
  507 + $scope.TermInfo = response.data.Terms.Term;
499 508  
500   - var termTextdata = new jinqJs()
501   - .from($scope.TermInfo)
502   - .where("__ActualTermNumber == " + pinTermNumber)
503   - .select();
  509 + if ($scope.TermInfo != null && $scope.TermInfo.length > 0) {
504 510  
505   - var termText = termTextdata[0].__TermText;
506   - $scope.MultiLanguageAnnationArray = [];
507   - $scope.MultiLanguageAnnationArray.push(termText);
  511 + var termTextdata = new jinqJs()
  512 + .from($scope.TermInfo)
  513 + .where("__ActualTermNumber == " + pinTermNumber)
  514 + .select();
508 515  
509   - if (isCtrlPressed) {
  516 + var termText = termTextdata[0].__TermText;
  517 + $scope.MultiLanguageAnnationArray = [];
  518 + $scope.MultiLanguageAnnationArray.push(termText);
510 519  
511   - }
512   - else {
513   - if (isPinClicked) {
514   - var existingSpeechBubble = $("div[id*='sppeachBubble']");
515   - for (var i = 0; i < existingSpeechBubble.length; i++) {
516   - existingSpeechBubble[i].parentNode.removeChild(existingSpeechBubble[i]);
517   -
518   - //make all pin heads grey
519   - var radial = $('#aaDetailViewCanvas').createGradient({
520   - x1: 50, y1: 50,
521   - x2: 50, y2: 50,
522   - r1: 10, r2: 30,
523   - c1: 'rgba(100, 50, 0,0)',
524   - c2: 'rgb(216, 216, 216)'
525   - });
526   -
527   -
528   - $('#aaDetailViewCanvas').setLayers({
529   - fillStyle: radial,
530   - }).drawLayers();
531   - }
  520 + if (isCtrlPressed) {
532 521  
533   - var existingSpeechBubbleLine = $("div[id*='speechBubbleLine']");
534   - for (var i = 0; i < existingSpeechBubbleLine.length; i++) {
535   - existingSpeechBubbleLine[i].parentNode.removeChild(existingSpeechBubbleLine[i]);
536 522 }
537   - var speechBubbleDraggedLine = $("div[id*='speechBubbleDraggedLine']");
538   - for (var i = 0; i < speechBubbleDraggedLine.length; i++) {
539   - speechBubbleDraggedLine[i].parentNode.removeChild(speechBubbleDraggedLine[i]);
  523 + else {
  524 + if (isPinClicked) {
  525 + var existingSpeechBubble = $("div[id*='speechBubble']");
  526 + for (var i = 0; i < existingSpeechBubble.length; i++) {
  527 + existingSpeechBubble[i].parentNode.removeChild(existingSpeechBubble[i]);
  528 +
  529 + //make all pin heads grey
  530 + var radial = $('#aaDetailViewCanvas').createGradient({
  531 + x1: 50, y1: 50,
  532 + x2: 50, y2: 50,
  533 + r1: 10, r2: 30,
  534 + c1: 'rgba(100, 50, 0,0)',
  535 + c2: 'rgb(216, 216, 216)'
  536 + });
  537 +
  538 +
  539 + $('#aaDetailViewCanvas').setLayers({
  540 + fillStyle: radial,
  541 + }).drawLayers();
  542 + }
  543 +
  544 + var existingSpeechBubbleLine = $("div[id*='speechBubbleLine']");
  545 + for (var i = 0; i < existingSpeechBubbleLine.length; i++) {
  546 + existingSpeechBubbleLine[i].parentNode.removeChild(existingSpeechBubbleLine[i]);
  547 + }
  548 + var speechBubbleDraggedLine = $("div[id*='speechBubbleDraggedLine']");
  549 + for (var i = 0; i < speechBubbleDraggedLine.length; i++) {
  550 + speechBubbleDraggedLine[i].parentNode.removeChild(speechBubbleDraggedLine[i]);
  551 + }
  552 + }
  553 + }
  554 + if (pinDataWithFirstTermNumber.length > 1) {
  555 + isSameTermWithMultiPin = true;
540 556 }
541   - }
542   - }
543   - if (pinDataWithFirstTermNumber.length > 1) {
544   - isSameTermWithMultiPin = true;
545   - }
546 557  
547   - angular.forEach(pinDataWithFirstTermNumber, function (value, key) {
548   - $scope.selectedPin.push(value._PinId);
549   - var headX = (parseInt(value._HeadX));
550   - var headY = (parseInt(value._HeadY));
551   - $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin);
552   - })
  558 + angular.forEach(pinDataWithFirstTermNumber, function (value, key) {
  559 + $scope.selectedPin.push(value._PinId);
  560 + var headX = (parseInt(value._HeadX));
  561 + var headY = (parseInt(value._HeadY));
  562 + $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin);
  563 + })
  564 + }
  565 + },
553 566  
554   - },
555   - function (error) { })
  567 + function (error) { })
  568 + }
556 569 }
557 570  
558   - $scope.ClearAllPins = function () {
559   -
560   - //var canvasHeight = document.getElementById('aaDetailViewCanvas').height;
561   - //var canvasWidth = document.getElementById('aaDetailViewCanvas').width;
562   -
563   - //$scope.context.clearRect(0, 0, canvasWidth, canvasHeight);
564   -
565   - $('#aaDetailViewCanvas').clearCanvas();
  571 + $scope.removeSpeechBubble = function () {
566 572  
  573 +
567 574 //clear speech bubbles
568   - var speechBubbles = $("div[id*='sppeachBubble']");
  575 + var speechBubbles = $("div[id*='speechBubble']");
569 576 if (speechBubbles != null || speechBubbles != undefined && speechBubbles.length > 0) {
570 577 for (var j = 0; j < speechBubbles.length; j++) {
571 578  
572 579 speechBubbles[j].parentNode.removeChild(speechBubbles[j]);
573 580 }
574 581 }
575   - var speechBubbleLines = $("div[id*='sppeachBubbleLine']");
  582 + var speechBubbleLines = $("div[id*='speechBubbleLine']");
576 583 if (speechBubbleLines != null || speechBubbleLines != undefined && speechBubbleLines.length > 0) {
577 584 for (var j = 0; j < speechBubbleLines.length; j++) {
578 585  
579 586 speechBubbleLines[j].parentNode.removeChild(speechBubbleLines[j]);
580 587 }
581 588 }
  589 +
  590 + var speechBubbleDraggedLines = $("div[id*='speechBubbleDraggedLine']");
  591 + if (speechBubbleDraggedLines != null || speechBubbleDraggedLines != undefined && speechBubbleDraggedLines.length > 0) {
  592 + for (var j = 0; j < speechBubbleDraggedLines.length; j++) {
  593 +
  594 + speechBubbleDraggedLines[j].parentNode.removeChild(speechBubbleDraggedLines[j]);
  595 + }
  596 + }
582 597 };
583 598  
584 599  
... ... @@ -589,7 +604,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
589 604  
590 605 $scope.createSpeechBubbleBasedOnAnnotationLength(x, y, PinId);
591 606  
592   - $('#sppeachBubble').draggable(
  607 + $('#speechBubble').draggable(
593 608 {
594 609 drag: function (evt) {
595 610 $("#dot").css("visibility", "hidden");
... ... @@ -601,88 +616,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
601 616  
602 617 }
603 618  
604   - $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo, language) {
605   -
606   - var Annotation;
607   - $scope.ActualTermNo = actualTermNo;
608   - for (var j = 0; j <= $rootScope.vocabTermDataArray.length - 1; j++) {
609   -
610   - if ($rootScope.vocabTermDataArray[j].language == language) {
611   -
612   - if ($rootScope.vocabTermDataArray[j].VocabTermData != null || $rootScope.vocabTermDataArray[j].VocabTermData != undefined) {
613   - $scope.matchedActualTermData = new jinqJs()
614   - .from($rootScope.vocabTermDataArray[j].VocabTermData.VocabTerms.Term)
615   - .where('_ActualTermNumber == ' + actualTermNo)
616   - .select();
617   -
618   - if ($scope.matchedActualTermData != null || $scope.matchedActualTermData != undefined) {
619   - for (var z = 0; z <= $scope.matchedActualTermData.length; z++) {
620   - //send actual term no to get the term text.
621   - Annotation = $scope.matchedActualTermData[0]._TermText;
622   - // alert("Annotation : " + Annotation);
623   - break;
624   - };
625   - }
626   - return Annotation;
627   - }
628   -
629   - else {
630   - return null;
631   - }
632   -
633   - }
634   - }
635   -
636   - }
637   -
638   - $scope.GetAnnotationText = function (termNumber) {
639   - $rootScope.annotationText = [];
640   - var annotationText;
641   - var annotation = [];
642   - //0
643   - var figLeafTermNo = 5868; // to do declare constant for this
644   -
645   - if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
646   - $scope.TermNumber = termNumber;
647   - for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) {
648   - if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) {
649   - $scope.matchedTermNoData = new jinqJs()
650   - .from($rootScope.TermNumberData.TermData.Term)
651   - .where('_TermNumber == ' + termNumber)
652   - .select();
653   -
654   - if ($scope.matchedTermNoData != null || $scope.matchedTermNoData != undefined) {
655   - //1.
656   - var actualTermNo = 0;
657   - for (var z = 0; z < $scope.matchedTermNoData.length; z++) {
658   - //send actual term no to get the term text.
659   - actualTermNo = $scope.matchedTermNoData[0]._ActualTermNumber;
660   - annotationText = $scope.GetAnnotationBasedOnActualTermNo(actualTermNo, $rootScope.lexiconLanguageArray[j].language);
661   - annotation.push(annotationText);
662   - $rootScope.annotationText.push(annotationText);
663   - $rootScope.actualTermNumber = actualTermNo;
664   - break;
665   - };
666   -
667   - //2.
668   -
669   - }
670   - else {
671   - // send term no to vocab json data to get the text
672   - }
673   - }
674   - }
675   - }
676   -
677   - return annotation;
678   - }
679   -
680   -
681   -
682 619 $scope.createSpeechBubbleBasedOnAnnotationLength = function (x, y, PinId) {
683 620  
684 621 var speechBubbleHTML = '<div id="speechBubbleLine' + PinId + '" 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>'
685   - + '<div id="sppeachBubble' + PinId + '" class="common-drag" style="height:auto!important;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;">'
  622 + + '<div id="speechBubble' + PinId + '" class="common-drag" style="height:auto!important;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;">'
686 623 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
687 624 + '<img id="closeBtn' + PinId + ' " class="crossDiv_temp" style="width:18px" src=' + $rootScope.closeBtnImgPath + '></span></div>'
688 625  
... ... @@ -702,7 +639,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
702 639 if ($scope.MultiLanguageAnnationArray.length > 0) {
703 640 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
704 641 var MultipleLanguage = $scope.MultiLanguageAnnationArray[i];
705   - $("#sppeachBubble" + PinId).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>");
  642 + $("#speechBubble" + PinId).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>");
706 643 }
707 644 }
708 645 else {
... ... @@ -712,7 +649,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
712 649 if ($scope.longestAnnotation.length <= 10) {
713 650  
714 651  
715   - $("#sppeachBubble").css("width", "100px");
  652 + $("#speechBubble").css("width", "100px");
716 653  
717 654 }
718 655  
... ... @@ -720,82 +657,80 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
720 657  
721 658  
722 659  
723   - $("#sppeachBubble").css("width", "140px");
  660 + $("#speechBubble").css("width", "140px");
724 661  
725 662 }
726 663 else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) {
727 664  
728 665  
729   - $("#sppeachBubble").css("width", "195px");
  666 + $("#speechBubble").css("width", "195px");
730 667  
731 668 }
732 669 else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) {
733 670  
734   - $("#sppeachBubble").css("width", "248px");
  671 + $("#speechBubble").css("width", "248px");
735 672  
736 673 }
737 674 else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) {
738 675  
739 676  
740   - $("#sppeachBubble").css("width", "300px");
  677 + $("#speechBubble").css("width", "300px");
741 678 }
742 679  
743 680 else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) {
744 681  
745   - $("#sppeachBubble").css("width", "370px");
  682 + $("#speechBubble").css("width", "370px");
746 683 }
747 684  
748 685 else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) {
749   - $("#sppeachBubble").css("width", "450px");
  686 + $("#speechBubble").css("width", "450px");
750 687 }
751 688 else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) {
752   - $("#sppeachBubble").css("width", "510px");
  689 + $("#speechBubble").css("width", "510px");
753 690 }
754 691 else {
755   - $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%");
  692 + $("#speechBubble").css("width", ($scope.longestAnnotation.length) + "%");
756 693 }
757 694 }
758 695 }
759   - var Globe = [];
  696 + var speechBubbleDims = [];
760 697  
761   - $rootScope.Globe1.push({ "currentX": x, "currentY": y, "id": PinId });
762   - Globe.push({ currentX: x, currentY: y });
  698 + $rootScope.speechBubbleDimaensions.push({ "currentX": x, "currentY": y, "id": PinId });
  699 + speechBubbleDims.push({ currentX: x, currentY: y });
763 700 document.getElementById('speechBubbleLine' + PinId + '').style.display = 'block';
764   - document.getElementById('speechBubbleLine' + PinId + '').style.left = ((Globe[0].currentX - 45)) + 'px';
765   - document.getElementById('speechBubbleLine' + PinId + '').style.top = ((Globe[0].currentY) - 20) + 'px';
766   - document.getElementById('sppeachBubble' + PinId + '').style.display = 'block';
767   - document.getElementById('sppeachBubble' + PinId + '').style.left = (Globe[0].currentX - 70) + 'px';
768   - document.getElementById('sppeachBubble' + PinId + '').style.top = (Globe[0].currentY - 58) + 'px';
  701 + document.getElementById('speechBubbleLine' + PinId + '').style.left = ((speechBubbleDims[0].currentX - 45)) + 'px';
  702 + document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY) - 20) + 'px';
  703 + document.getElementById('speechBubble' + PinId + '').style.display = 'block';
  704 + document.getElementById('speechBubble' + PinId + '').style.left = (speechBubbleDims[0].currentX - 70) + 'px';
  705 + document.getElementById('speechBubble' + PinId + '').style.top = (speechBubbleDims[0].currentY - 58) + 'px';
769 706  
770 707 $('.common-drag').draggable(
771 708 {
  709 +
772 710 drag: function (evt) {
773 711  
774 712 var verticalScrollPosition = document.getElementById('imageDiv').scrollTop;
775 713 var horizontlScrollPosition = document.getElementById('imageDiv').scrollLeft;
776   - var a = $(this).attr("id");
  714 + var clickedSpeechBubbleId = $(this).attr("id");
777 715  
778   - var res = a.substring(13, a.length);
779   - $("#speechBubbleLine" + res).css("visibility", "hidden");
  716 + var clickedPinId = clickedSpeechBubbleId.substring(12, clickedSpeechBubbleId.length);
780 717  
781   -
782   - console.log("res= " + res + "x= " + x + ",y= " + y + ",evt.pageY= " + evt.page + ",evt.pageX= " + evt.pageX + ",horizontlScrollPosition= " + horizontlScrollPosition + ",verticalScrollPosition= " + verticalScrollPosition);
  718 + $("#speechBubbleLine" + clickedPinId).css("visibility", "hidden");
783 719  
784   -
785   - for (var i = 0; i <= $rootScope.Globe1.length - 1; i++) {
786   - if ($rootScope.Globe1[i].id == res) {
787   -
788   - $scope.angle(res, $rootScope.Globe1[i].currentX, $rootScope.Globe1[i].currentY, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true);
  720 +
  721 + for (var i = 0; i <= $rootScope.speechBubbleDimaensions.length - 1; i++) {
  722 + if ($rootScope.speechBubbleDimaensions[i].id == clickedPinId) {
  723 + $scope.angle(clickedPinId, $rootScope.speechBubbleDimaensions[i].currentX, $rootScope.speechBubbleDimaensions[i].currentY, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true);
789 724 }
790 725 }
791 726  
792 727 },
793 728 });
794 729 $('.crossDiv_temp').on('click', function (evt) {
795   -
  730 +
796 731 var imgId = $(this).attr("id");
797 732 var pinId = imgId.substring(8, imgId.length);
798   - $('#sppeachBubble' + pinId).remove();
  733 + $('#speechBubble' + pinId).remove();
799 734 $("#speechBubbleDraggedLine" + pinId).remove();
800 735 $("#speechBubbleLine" + pinId).remove();
801 736  
... ... @@ -814,7 +749,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
814 749 fillStyle: radial,
815 750 }).drawLayers();
816 751 });
817   -
  752 +
818 753 //make the head green
819 754 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
820 755 x1: 50, y1: 50,
... ... @@ -868,7 +803,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
868 803 }
869 804  
870 805  
871   - $scope.DrawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) {
  806 + $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) {
872 807  
873 808 var radial = $('#' + canvasId).createGradient({
874 809 x1: 50, y1: 50,
... ... @@ -935,13 +870,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
935 870 }
936 871  
937 872  
938   - $scope.onCloseBtnClick = function (event) {
939   - alert('closed')
940   - }
  873 + $scope.removePin = function (canvasId,pinId) {
941 874  
942   - $("#closeBtn").click(function () {
943   - alert('closed')
944   - });
  875 + var pinName = 'Pin_' + pinId;
  876 + var pinArcName = 'PinArc_' + pinId;
  877 + $('#' + canvasId).removeLayer(pinName).drawLayers();
  878 + $('#' + canvasId).removeLayer(pinArcName).drawLayers();
  879 +
  880 + $scope.removeSpeechBubble();
  881 + }
945 882 }]);
946 883  
947 884 function showSelectedSystemPins(event) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... ... @@ -92,7 +92,7 @@ AIA.service(&#39;ModuleService&#39;, function($http, DataService) {
92 92  
93 93 },
94 94  
95   - getTermTextForPin: function (moduleName) {
  95 + getTermTextDataForPin: function (moduleName) {
96 96  
97 97 var jsonPath;
98 98 if (moduleName == ATLAS_ANATOMY) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... ... @@ -18,7 +18,7 @@
18 18 <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu221" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><img src="../../../content/images/aa/LeftMenu/icon-highlight.png" alt="" title=""></button>
19 19  
20 20 <ul class="dropdown-menu" aria-labelledby="dropdownMenu221" id="bodySystemList">
21   - <li><a href="#" title="Current Structure">All</a></li>
  21 + <li><a id="0" href="#" title="Current Structure" onclick="showSelectedSystemPins(event)">All</a></li>
22 22 <li role="separator" class="divider"></li>
23 23 <li class="disabled"><a id="1" href="#" title="Cardiovascular" onclick="showSelectedSystemPins(event)">Cardiovascular</a></li>
24 24 <li class="disabled"><a id="2" href="#" title="Digestive" onclick="showSelectedSystemPins(event)">Digestive</a></li>
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -1011,7 +1011,7 @@ background-size:cover;
1011 1011 .tinyImg {
1012 1012 display: block;
1013 1013 max-width: 230px;
1014   - max-height: 95px;
  1014 + /*max-height: 95px;*/
1015 1015 width: auto;
1016   - height: auto;
  1016 + height: 95px !important;
1017 1017 }
1018 1018 \ No newline at end of file
... ...