From 523e0176694d47cb48edd72822604c928268424b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 15 Nov 2016 10:54:18 +0530 Subject: [PATCH] Annotation: Edit Text option is missing. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 -- libgit2 0.21.4