diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index f6a286a..05049c4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -950,6 +950,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.TextAreaRectID = layer.name; $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); + $rootScope.CurrentWidth = layer.width; + $rootScope.CurrentHeight = layer.height; }, click: function (layer) { @@ -1031,9 +1033,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } }); - + // Annotation: Edit Text option is missing. + // alert($rootScope.CurrentWidth); + // alert($rootScope.CurrentHeight); $("#annotationTextModal").css("padding-right", "0px"); - $("#annotationTextModal").modal("toggle"); + if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { + $("#annotationTextModal").modal("toggle"); + document.getElementById('modelbackground').style.display = "block"; + } $('.btnCursor').trigger('click'); $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); @@ -1168,7 +1175,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", break; case "TextArea": - document.getElementById('modelbackground').style.display = "block"; + $rootScope.IsTextAlreadySave = false; $("#text_area").val(''); // Draw text