Commit 523e0176694d47cb48edd72822604c928268424b

Authored by unknown
1 parent da83ae87

Annotation: Edit Text option is missing.

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(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
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
... ...