Commit 38fa0efbc97e7b48a5cc643c4ac2b829db07f755

Authored by unknown
1 parent 582dbc1f

Commit Changes

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -613,9 +613,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
613 613 strokeStyle: shapestyleborderColor,
614 614 opacity: shapestyleOpacity,
615 615 strokeWidth: shapestyleborderWidth,
616   - x: offsetX1 + 40, y: offsetY1 + 40,
617   - width: (x - offsetX1),
618   - height:(y - offsetY1),
  616 + x: offsetX1, y: offsetY1,
  617 + width: (x - offsetX1) * 2,
  618 + height: (y - offsetY1) * 2,
619 619  
620 620 resizeFromCenter: false,
621 621  
... ... @@ -680,7 +680,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
680 680 }
681 681  
682 682 $rootScope.CircleFn = function (canvasId, CircleNumber, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, offsetX1, offsetY1, x, y) {
683   - // console.log("up"+ offsetX1 + " " + offsetY1 + " " + (x - offsetX1) + " " + (y - offsetY1));
  683 + // console.log("up"+ offsetX1 + " " + offsetY1 + " " + (x - offsetX1) + " " + (y - offsetY1));
684 684 $(canvasId).addLayer({
685 685 layer: true,
686 686 name: 'Circle_' + CircleNumber,
... ... @@ -690,8 +690,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
690 690 strokeStyle: shapestyleborderColor,
691 691 strokeWidth: shapestyleborderWidth,
692 692 fillStyle: shapestyleFillColor,
693   - x: (offsetX1 + 40), y: (offsetY1 + 40),
694   - width: (x - offsetX1), height: (y - offsetY1),
  693 + x: (offsetX1), y: (offsetY1),
  694 + width: (x - offsetX1) * 2, height: (y - offsetY1) * 2,
695 695 // Place a handle at each side and each corner
696 696 handlePlacement: 'both',
697 697 click: function (layer) {
... ... @@ -814,11 +814,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
814 814 }
815 815  
816 816 $rootScope.PinFn = function (canvasId, PinNumber, offsetX1, offsetY1, x, y, PinArcNumber) {
817   -
  817 +
818 818 var xAxisPinDiff = offsetX1 - x;
819 819 var yAxisPinDiff = offsetY1 - y;
820   - if (xAxisPinDiff != 0 && yAxisPinDiff != 0)
821   - {
  820 + if (xAxisPinDiff != 0 && yAxisPinDiff != 0) {
822 821  
823 822 var radial = $('#canvas').createGradient({
824 823 x1: 50, y1: 50,
... ... @@ -923,8 +922,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
923 922  
924 923 }).drawLayers();
925 924 }
926   -
927   -
  925 +
  926 +
928 927 $('.btnCursor').trigger('click');
929 928 $(".btn-annotation").removeClass("activebtncolor");
930 929 $('.btnCursor').addClass('activebtncolor');
... ... @@ -933,7 +932,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
933 932 $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) {
934 933  
935 934  
936   - // debugger;
  935 + // debugger;
937 936  
938 937 $('#canvas').drawText({
939 938 layer: true,
... ... @@ -965,9 +964,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
965 964 strokeStyle: $rootScope.shapestyleborderColor,
966 965 strokeWidth: $rootScope.shapestyleborderWidth,
967 966 fillStyle: $rootScope.shapestyleFillColor,
968   - x: $rootScope.offsetX1 + 40, y: $rootScope.offsetY1 + 40,
969   - width: ($rootScope.x - $rootScope.offsetX1),
970   - height:($rootScope.y - $rootScope.offsetY1),
  967 + x: $rootScope.offsetX1, y: $rootScope.offsetY1,
  968 + width: ($rootScope.x - $rootScope.offsetX1) * 2,
  969 + height: ($rootScope.y - $rootScope.offsetY1) * 2,
971 970 add: function (layer) {
972 971  
973 972 $rootScope.TextAreaRectID = layer.name;
... ... @@ -1143,9 +1142,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1143 1142 var arrayRect = {};
1144 1143  
1145 1144 var storeLine = '';
1146   -
  1145 +
1147 1146 $rootScope.OnPaintCanvasMouseUp = function (event) {
1148   -
  1147 +
1149 1148 if (!$rootScope.clicked) {
1150 1149 return;
1151 1150 }
... ... @@ -1221,7 +1220,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1221 1220 switch ($rootScope.shapeType) {
1222 1221 case "Line":
1223 1222 $(".line").remove();
1224   - // console.log($rootScope.MouseMoveXAxis - $rootScope.offsetX1);
  1223 + // console.log($rootScope.MouseMoveXAxis - $rootScope.offsetX1);
1225 1224 $("#canvasDiv").append("<div class='line' style='border:1px dashed #AEAEAE;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>");
1226 1225 $rootScope.Annotationangle();
1227 1226 break;
... ... @@ -1237,17 +1236,17 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1237 1236 break;
1238 1237 case "Circle":
1239 1238 $(".circle").remove();
1240   - // console.log($rootScope.offsetX1 + " " + $rootScope.offsetY1 + " " + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + " " + Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1));
  1239 + // console.log($rootScope.offsetX1 + " " + $rootScope.offsetY1 + " " + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + " " + Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1));
1241 1240 $("#canvasDiv").append("<div class='circle' style='border-radius:50%;border:1px dashed #AEAEAE;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
1242 1241 break;
1243 1242 case "Rectangle":
1244 1243 $(".rectangle").remove();
1245   - // console.log($rootScope.offsetX1 + " " + $rootScope.offsetY1 + " " + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + " " + Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1));
  1244 + // console.log($rootScope.offsetX1 + " " + $rootScope.offsetY1 + " " + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + " " + Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1));
1246 1245 $("#canvasDiv").append("<div class='rectangle' style='border:1px dashed #AEAEAE;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
1247 1246 break;
1248 1247 case "TextArea":
1249 1248 $(".textarea").remove();
1250   - // console.log($rootScope.offsetX1 + " " + $rootScope.offsetY1 + " " + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + " " + Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1));
  1249 + // console.log($rootScope.offsetX1 + " " + $rootScope.offsetY1 + " " + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + " " + Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1));
1251 1250 $("#canvasDiv").append("<div class='textarea' style='border:1px dashed #AEAEAE;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>");
1252 1251 break;
1253 1252 }
... ... @@ -1271,22 +1270,22 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1271 1270 theta = Math.atan(dy / dx) * (180 / Math.PI);
1272 1271 }
1273 1272 var dottedLineWidth = Math.sqrt(($rootScope.offsetX1 - $rootScope.MouseMoveXAxis) * ($rootScope.offsetX1 - $rootScope.MouseMoveXAxis) + ($rootScope.offsetY1 - $rootScope.MouseMoveYAxis) * ($rootScope.offsetY1 - $rootScope.MouseMoveYAxis));
1274   - switch ($rootScope.shapeType) {
  1273 + switch ($rootScope.shapeType) {
1275 1274 case "Line":
1276 1275 $('.line').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
1277 1276 break;
1278   - case "Arrow":
1279   - $('.arrow').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
1280   - break;
1281   - case "Pin":
1282   - $('.pin').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
1283   - break;
  1277 + case "Arrow":
  1278 + $('.arrow').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
  1279 + break;
  1280 + case "Pin":
  1281 + $('.pin').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
  1282 + break;
1284 1283 }
1285 1284 }
1286 1285  
1287 1286 ///-----
1288 1287 $rootScope.saveText = function () {
1289   -
  1288 +
1290 1289 document.getElementById('modelbackground').style.display = "none";
1291 1290 // this part will work first time when save button will be clicked
1292 1291 if ($rootScope.IsTextAlreadySave == false) {
... ... @@ -1920,18 +1919,18 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1920 1919  
1921 1920 $('#listManager').css('display', 'block');
1922 1921 $("#listManager").css("visibility", "visible");
1923   -
1924   - // $('#termList option[selected="selected"]').prop("selected", false);
1925   - // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").prop("selected", true);
1926   - // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
1927   - // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  1922 +
  1923 + // $('#termList option[selected="selected"]').prop("selected", false);
  1924 + // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").prop("selected", true);
  1925 + // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  1926 + // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
1928 1927 $('#listManager').draggable();
1929 1928  
1930 1929  
1931 1930 $rootScope.islistManagerEventAlredayDispachted = true;
1932 1931  
1933 1932 $rootScope.$broadcast('listManagerEvent', true);
1934   -
  1933 +
1935 1934 $('#termList option[selected="selected"]').prop("selected", false);
1936 1935 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
1937 1936 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
... ...