diff --git a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
index e121857..de2feb3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
+++ b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
@@ -44581,7 +44581,6 @@
" + annotation + "
"); - } - - if ($scope.longestAnnotation.length <= 10) { - $("#" + id).css("width", "100px"); - } - - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { - $("#" + id).css("width", "140px"); - } - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { - $("#" + id).css("width", "195px"); - - } - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { - $("#" + id).css("width", "248px"); - } - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { - $("#" + id).css("width", "300px"); - } - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { - $("#" + id).css("width", "370px"); - } - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { - $("#" + id).css("width", "450px"); - } - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { - $("#" + id).css("width", "510px"); + $scope.createSpeechBubbleBasedOnAnnotationLength = function (x, y, PinId) { - } - else { - $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); - } - } - } - $rootScope.Globe1 = []; - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y, PinId) { - var sppechBubbleDotHTML = '' + var speechBubbleHTML = '' + '" + MultipleLanguage + "
"); + $("#sppeachBubble" + PinId).append("" + MultipleLanguage + "
"); } } else { @@ -762,89 +755,191 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } var Globe = []; - + $rootScope.Globe1.push({ "currentX": x, "currentY": y, "id": PinId }); - Globe.push({ currentX: x, currentY: y}); + Globe.push({ currentX: x, currentY: y }); document.getElementById('speechBubbleLine' + PinId + '').style.display = 'block'; document.getElementById('speechBubbleLine' + PinId + '').style.left = ((Globe[0].currentX - 45)) + 'px'; document.getElementById('speechBubbleLine' + PinId + '').style.top = ((Globe[0].currentY) - 20) + 'px'; document.getElementById('sppeachBubble' + PinId + '').style.display = 'block'; document.getElementById('sppeachBubble' + PinId + '').style.left = (Globe[0].currentX - 70) + 'px'; document.getElementById('sppeachBubble' + PinId + '').style.top = (Globe[0].currentY - 58) + 'px'; - + $('.common-drag').draggable( { drag: function (evt) { - // $("#dot").css("visibility", "hidden"); + var verticalScrollPosition = document.getElementById('imageDiv').scrollTop; var horizontlScrollPosition = document.getElementById('imageDiv').scrollLeft; var a = $(this).attr("id"); - + var res = a.substring(13, a.length); $("#speechBubbleLine" + res).css("visibility", "hidden"); - - // var c = ($("#sppeachBubble" + res).css("left")).toString().replace("px", ""); - // alert(c); - //var d = ($("#sppeachBubble" + res).css("top")).toString().replace("px", ""); - // alert(d); - console.log("res= " + res + "x= " + x + ",y= " + y + ",evt.pageY= " + evt.page + ",evt.pageX= " + evt.pageX + ",horizontlScrollPosition= " + horizontlScrollPosition + ",verticalScrollPosition= " + verticalScrollPosition); - - // alert(evt.pageX + "X" + evt.pageY + "horizontlScrollPosition" + horizontlScrollPosition + "verticalScrollPosition" + verticalScrollPosition); - for (var i = 0; i <= $rootScope.Globe1.length - 1; i++) { - if ($rootScope.Globe1[i].id == res) { - // alert($rootScope.Globe1[i].currentX); - $scope.angle(res, $rootScope.Globe1[i].currentX, $rootScope.Globe1[i].currentY, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true); - } - } + + + console.log("res= " + res + "x= " + x + ",y= " + y + ",evt.pageY= " + evt.page + ",evt.pageX= " + evt.pageX + ",horizontlScrollPosition= " + horizontlScrollPosition + ",verticalScrollPosition= " + verticalScrollPosition); + + for (var i = 0; i <= $rootScope.Globe1.length - 1; i++) { + if ($rootScope.Globe1[i].id == res) { + + $scope.angle(res, $rootScope.Globe1[i].currentX, $rootScope.Globe1[i].currentY, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true); + } + } + }, }); $('.crossDiv_temp').on('click', function (evt) { + var imgId = $(this).attr("id"); var pinId = imgId.substring(8, imgId.length); $('#sppeachBubble' + pinId).remove(); $("#speechBubbleDraggedLine" + pinId).remove(); $("#speechBubbleLine" + pinId).remove(); + + //make all pin heads grey + var pinHeadName = 'PinArc_' + pinId; + var radial = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(216, 216, 216)' + }); + + + $('#aaDetailViewCanvas').setLayer(pinHeadName, { + fillStyle: radial, + }).drawLayers(); }); + + //make the head green + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); + var pinHeadName = 'PinArc_' + PinId; + var pin = $('#aaDetailViewCanvas').getLayer(pinHeadName); + // pin.fillStyle = radialAfterClick; + + $('#aaDetailViewCanvas').setLayer(pinHeadName, { + fillStyle: radialAfterClick, + }).drawLayers(); } + + + $scope.angle = function (id, cx, cy, ex, ey, BoolValues) { + var dy = ey - cy; + var dx = ex - cx; + var theta = 0; + if (dx < 0) { + theta = Math.atan(dy / dx) * (180 / Math.PI); + theta = theta + 180; + + } + else if (dy < 0) { + theta = Math.atan(dy / dx) * (180 / Math.PI); + theta = theta + 360; + + } + else { + theta = Math.atan(dy / dx) * (180 / Math.PI); + } + + var d = Math.sqrt((cx - ex) * (cx - ex) + (cy - ey) * (cy - ey)); + var e = cy; + var f = cx; - $scope.angle = function (id, cx, cy, ex, ey, BoolValues) { - // debugger; - // alert(ex + " " + ey); - var dy = ey - cy; - var dx = ex - cx; - var theta = 0; - if (dx < 0) { - theta = Math.atan(dy / dx) * (180 / Math.PI); - theta = theta + 180; + if (BoolValues == true) { + $("#speechBubbleDraggedLine" + id).css({ 'display': 'block', 'width': d + 'px', 'top': (e - 10) + 'px', 'left': (f - 5) + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' }); + } + else { + $("#bord_annotation").css({ 'display': 'block', 'width': d + 'px', 'top': e + 'px', 'left': f + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' }); + } - } - else if (dy < 0) { - theta = Math.atan(dy / dx) * (180 / Math.PI); - theta = theta + 360; - } - else { - theta = Math.atan(dy / dx) * (180 / Math.PI); - } - var d = Math.sqrt((cx - ex) * (cx - ex) + (cy - ey) * (cy - ey)); - var e = cy; - var f = cx; - // alert(d); - if (BoolValues == true) { - $("#speechBubbleDraggedLine"+id).css({ 'display': 'block', 'width': d + 'px', 'top': e + 'px', 'left': f + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' }); - } - else { - $("#bord_annotation").css({ 'display': 'block', 'width': d + 'px', 'top': e + 'px', 'left': f + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' }); + } + + + $scope.DrawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) { + + var radial = $('#' + canvasId).createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(216, 216, 216)' + }); + $('#' + canvasId).drawLine({ + + layer: true, + name: "Pin_" + PinId, + groups: ["Pin_" + PinId], + strokeStyle: 'black', + strokeWidth: 2, + x1: offsetX1, y1: offsetY1, + x2: x, y2: y, + + }).drawArc({ + name: "PinArc_" + PinId, + layer: true, + groups: ["Pin_" + PinId], + strokeStyle: 'grey', + strokeWidth: 2, + fillStyle: radial, + x: x, y: y, + radius: 5, + + click: function (clickedPin) { + + //change the head color to green + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); + + clickedPin.fillStyle = radialAfterClick; + + var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); + // alert('pinId: ' + pinID); + //showAnnotation(); + var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); + var selectedPinData = new jinqJs() + .from($scope.aaPinData) + .where("_PinId == " + pinID) + .select(); + if (clickedPin.event.ctrlKey == true) { + $scope.showAnnotation(selectedPinData, true, true); + + } + else { + $scope.showAnnotation(selectedPinData, false, true); + + } + + } + }).drawLayers(); + } - } - + $scope.onCloseBtnClick = function (event) { + alert('closed') + } + + $("#closeBtn").click(function () { + alert('closed') + }); }]); function showSelectedSystemPins(event) { @@ -853,4 +948,7 @@ function showSelectedSystemPins(event) { scope.$apply(function () { scope.showSelectedSystemPins(event); }); +} +onCloseBtnClick = function (event) { + alert('closed') } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html index a544d71..1e5859a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html @@ -11,7 +11,7 @@