diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 5d5cf4f..a4b02e3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -40,7 +40,7 @@ function ($scope, $rootScope, pages, log,Modules,$http,$compile) { .select(); for (var i = 0; i < $scope.countLeftlist; i++) { console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); - alert($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); + //alert($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); var $el = $('
" + MultipleLanguage + "
"); - } - } - else { - console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) + //Issue #7286 :Undefined annotation should not appear + for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { + var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; } - if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { - if ($scope.longestAnnotation.length <= 10) { - - $("#sppeachBubble").css("width", "100px"); + if (MultipleLanguage == undefined) { + console.log("No text is found"); + } else { + $('#canvasDiv').append(sppechBubbleDotHTML); + if ($scope.MultiLanguageAnnationArray.length > 0) { + for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { + var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; + $("#sppeachBubble").append("" + MultipleLanguage + "
"); + } + } + else { + console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) } + if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { + if ($scope.longestAnnotation.length <= 10) { - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { + $("#sppeachBubble").css("width", "100px"); + } - $("#sppeachBubble").css("width", "140px"); + else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { - } - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { - $("#sppeachBubble").css("width", "195px"); + $("#sppeachBubble").css("width", "140px"); - } - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { + } + else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { - $("#sppeachBubble").css("width", "248px"); - } - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { + $("#sppeachBubble").css("width", "195px"); + } + else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { - $("#sppeachBubble").css("width", "300px"); - } + $("#sppeachBubble").css("width", "248px"); - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { + } + else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { - $("#sppeachBubble").css("width", "370px"); - } + $("#sppeachBubble").css("width", "300px"); + } - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { + else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { + $("#sppeachBubble").css("width", "370px"); - $("#sppeachBubble").css("width", "450px"); + } - } + else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { + $("#sppeachBubble").css("width", "450px"); - $("#sppeachBubble").css("width", "510px"); + } - } + else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { - else { + $("#sppeachBubble").css("width", "510px"); - $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); + } + else { - } + $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); + + + } + + } } var Globe = []; Globe.push({ currentX: x, currentY: y }); @@ -3189,44 +3199,54 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { var sppechBubbleHTML = "" + annotation + "
"); } - if ($scope.longestAnnotation.length <= 10) { - $("#" + id).css("width", "100px"); - } + if (annotation == undefined) { + console.log("No text found"); + } else { - 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"); + $("#canvasDiv").append(sppechBubbleHTML); - } - 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"); - } + for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { + var annotation = $scope.MultiLanguageAnnationArray[i]; - 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"); + $("#" + id).append("" + annotation + "
"); + } - } - else { - $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); + 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"); + + } + else { + $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); + } } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index ad5c07a..a62431a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -264,6 +264,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyle = function (id) { document.getElementById('modelbackground').style.display = "none"; + document.getElementById('modeleditstyle').style.display = "none"; $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color'); @@ -275,19 +276,21 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyleborderWidth = intPart[0]; $rootScope.shapestyleborderStyles = "solid"; - $('#editshapestyle').modal('hide'); + // $('#editshapestyle').modal('hide'); } $rootScope.enableAnnotationToolBar = function () { document.getElementById('modelbackground').style.display = "block"; - $("#editshapestyle").modal('show'); + // $("#editshapestyle").modal('show'); + document.getElementById('modeleditstyle').style.display = "block"; } $rootScope.disableAnnotationToolBar = function () { document.getElementById('modelbackground').style.display = "none"; + document.getElementById('modeleditstyle').style.display = "none"; } diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index d02ccc4..186a81f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -662,7 +662,131 @@ -