Commit 7e2c2cb78070c728ca5b9872f4370af73ebfc91e
Merge branch 'Develop' of http://52.6.196.163/ADAM/AIAHTML5 into Develop
Showing
1 changed file
with
10 additions
and
3 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -950,6 +950,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
950 | 950 | |
951 | 951 | $rootScope.TextAreaRectID = layer.name; |
952 | 952 | $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); |
953 | + $rootScope.CurrentWidth = layer.width; | |
954 | + $rootScope.CurrentHeight = layer.height; | |
953 | 955 | |
954 | 956 | }, |
955 | 957 | click: function (layer) { |
... | ... | @@ -1031,9 +1033,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1031 | 1033 | |
1032 | 1034 | } |
1033 | 1035 | }); |
1034 | - | |
1036 | + // Annotation: Edit Text option is missing. | |
1037 | + // alert($rootScope.CurrentWidth); | |
1038 | + // alert($rootScope.CurrentHeight); | |
1035 | 1039 | $("#annotationTextModal").css("padding-right", "0px"); |
1036 | - $("#annotationTextModal").modal("toggle"); | |
1040 | + if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { | |
1041 | + $("#annotationTextModal").modal("toggle"); | |
1042 | + document.getElementById('modelbackground').style.display = "block"; | |
1043 | + } | |
1037 | 1044 | $('.btnCursor').trigger('click'); |
1038 | 1045 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); |
1039 | 1046 | |
... | ... | @@ -1168,7 +1175,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1168 | 1175 | |
1169 | 1176 | break; |
1170 | 1177 | case "TextArea": |
1171 | - document.getElementById('modelbackground').style.display = "block"; | |
1178 | + | |
1172 | 1179 | $rootScope.IsTextAlreadySave = false; |
1173 | 1180 | $("#text_area").val(''); |
1174 | 1181 | // Draw text | ... | ... |