diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index be70841..fbe1c36 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -476,6 +476,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.showAnnotation = function (selectedSystemPinData) { + alert("Annotation Called First Time"); + var firstPinId = selectedSystemPinData[0]._PinId; var pinTermNumber = selectedSystemPinData[0]._TermId; @@ -493,9 +495,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.MultiLanguageAnnationArray.push(termText); angular.forEach(pinDataWithFirstTermNumber, function (value, key) { - var headX = (parseInt(value._HeadX)) - 20; - var headY = (parseInt(value._HeadY)) - 15; - $scope.createSpeechBubble(headX, parseInt(headY-10)); + var headX = (parseInt(value._HeadX)); + var headY = (parseInt(value._HeadY)); + $scope.createSpeechBubble(headX, parseInt(headY),value._PinId); // alert('headX: ' + headX + ', headY: ' + headY + ',termText: ' + termText); }) } @@ -508,11 +510,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.context.clearRect(0, 0, canvasWidth, canvasHeight); }; - $scope.createSpeechBubble = function (x,y) { + $scope.createSpeechBubble = function (x, y, PinId) { //1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that // we decide the size of speech bubble $scope.longestAnnotation = $scope.MultiLanguageAnnationArray.reduce(function (firstAnnotation, seconAnnotation) { return firstAnnotation.length > seconAnnotation.length ? firstAnnotation : seconAnnotation; }); + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y,PinId); + //2. //if (event.ctrlKey) { // console.log('ctrl pressed'); @@ -553,31 +557,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // }); //} // else { - $scope.multiAnnotationIsON = false; + // $scope.multiAnnotationIsON = false; //history maintained issue - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { - $("#sppeachBubble").remove(); - $("#dot").remove(); - } - $(".com").remove(); - $("#bord").remove(); - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y); + //if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + // $("#sppeachBubble").remove(); + // $("#dot").remove(); + //} + // $(".com").remove(); + // $("#bord").remove(); + //history maintained issue - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble').style.zIndex = "60000"; } - $('#sppeachBubble').draggable( - { - drag: function (evt) { - $("#dot").css("visibility", "hidden"); - var verticalScrollPosition = canvasDiv.scrollTop; - var horizontlScrollPosition = canvasDiv.scrollLeft; - $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true); - }, - }); - $('.crossDiv_temp').on('click', function (evt) { - $('#sppeachBubble').remove(); - $("#bord").remove(); - $("#dot").remove(); - }); + //if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble').style.zIndex = "60000"; } + //$('#sppeachBubble').draggable( + //{ + // drag: function (evt) { + // $("#dot").css("visibility", "hidden"); + // var verticalScrollPosition = canvasDiv.scrollTop; + // var horizontlScrollPosition = canvasDiv.scrollLeft; + // $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true); + // }, + //}); + //$('.crossDiv_temp').on('click', function (evt) { + // $('#sppeachBubble').remove(); + // $("#bord").remove(); + // $("#dot").remove(); + //}); //} } @@ -710,16 +714,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } } - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y) { + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y, PinId) { - var sppechBubbleDotHTML = '' - + '