Commit c105cbda97a4d83459b874c2b2a86e4cdc946266

Authored by unknown
1 parent 532e67d4

Merged Code With Stable Code

400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... ... @@ -563,7 +563,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
563 563 theme: 'success',
564 564 currentController: 'CIController',
565 565 parentSlug: 'clinical-illustrations',
566   - content: '<div class="row"><div style="align:left;width:100%;height:100%"><canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="1369" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas></div> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas>' +
  566 + content: '<div class="row" id="canvasDiv"><div style="align:left;width:100%;height:100%"><canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="1369" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas></div> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas>' +
567 567 '<div class="col-sm-12 img-thumbnail" align="center">' +
568 568 '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well">' +
569 569 '<div align="left" id="sid"><p>' + $scope.clickedCISummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button>' +
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -457,7 +457,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
457 457 }
458 458 $rootScope.EraseDrawing = function () {
459 459 $rootScope.switchCanvas();
460   - $rootScope.isEraseToolSelected = true;
  460 + $rootScope.isEraseToolSelected = true;
  461 + //$rootScope.switchCanvasToPaintCanvas();
461 462 }
462 463  
463 464  
... ... @@ -1120,6 +1121,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1120 1121 // var y = event.clientY;
1121 1122 $rootScope.offsetX1 = 0;
1122 1123 $rootScope.offsetY1 = 0;
  1124 + //alert($location.path());
  1125 +
1123 1126 var canvasDiv = document.getElementById('canvasDiv');
1124 1127 var verticalScrollPosition = canvasDiv.scrollTop;
1125 1128 var horizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -1180,30 +1183,30 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1180 1183 break;
1181 1184 case "Line":
1182 1185 $rootScope.LineNumber = $rootScope.ObjectIndex++;
1183   - $rootScope.isLinePreviewCompleted = true;
  1186 + // $rootScope.isLinePreviewCompleted = true;
1184 1187 $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y)
1185 1188 break;
1186 1189 case "Rectangle":
1187 1190 $rootScope.rectNumber = $rootScope.ObjectIndex++;
1188   - $rootScope.isRectanglePreviewCompleted = true;
  1191 + // $rootScope.isRectanglePreviewCompleted = true;
1189 1192 $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1190 1193  
1191 1194 break;
1192 1195 case "Circle":
1193 1196 $rootScope.CircleNumber = $rootScope.ObjectIndex++;
1194   - $rootScope.isCirclePreviewCompleted = true;
  1197 + // $rootScope.isCirclePreviewCompleted = true;
1195 1198 $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1196 1199 break;
1197 1200 case "Arrow":
1198 1201 $rootScope.ArrowNumber = $rootScope.ObjectIndex++;
1199   - $rootScope.isArrowPreviewCompleted = true;
  1202 + //$rootScope.isArrowPreviewCompleted = true;
1200 1203 $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1201 1204 break;
1202 1205 case "Pin":
1203 1206 $rootScope.PinNumber = $rootScope.PinObjectIndex++;
1204 1207 $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++;
1205 1208  
1206   - $rootScope.isPinPreviewCompleted = true;
  1209 + //$rootScope.isPinPreviewCompleted = true;
1207 1210  
1208 1211 $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber);
1209 1212 break;
... ... @@ -1213,7 +1216,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1213 1216 // Draw text
1214 1217 $rootScope.resetTextRect = $rootScope.ObjectIndex++;
1215 1218 $rootScope.TextNumber = $rootScope.ObjectIndex++;
1216   - $rootScope.isTextAreaPreviewCompleted = true;
  1219 + // $rootScope.isTextAreaPreviewCompleted = true;
1217 1220 $rootScope.TextEditorFunctionality('#canvas', $rootScope.TextNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.resetTextRect, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.x, $rootScope.y);
1218 1221 break;
1219 1222 case "DrawPolygon":
... ... @@ -1232,35 +1235,35 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1232 1235 switch ($rootScope.shapeType) {
1233 1236 case "Line":
1234 1237 $(".line").remove();
1235   -
  1238 + $rootScope.isLinePreviewCompleted = true;
1236 1239 $("#canvasDiv").append("<div class='line' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>");
1237 1240 $rootScope.Annotationangle();
1238 1241 break;
1239 1242 case "Arrow":
1240 1243 $(".arrow").remove();
1241   -
  1244 + $rootScope.isArrowPreviewCompleted = true;
1242 1245 $("#canvasDiv").append("<div class='arrow' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='border-bottom: 9px solid transparent;border-right: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left: -6px;position: absolute;top: -8px;width: 0;'></div></div>");
1243 1246 $rootScope.Annotationangle();
1244 1247 break;
1245 1248 case "Pin":
1246 1249 $(".pin").remove();
1247   -
  1250 + $rootScope.isPinPreviewCompleted = true;
1248 1251 $("#canvasDiv").append("<div class='pin' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='background-color:#fff;left: -8px;position: absolute;top: -6px;width: 10;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>");
1249 1252 $rootScope.Annotationangle();
1250 1253 break;
1251 1254 case "Circle":
1252 1255 $(".circle").remove();
1253   -
  1256 + $rootScope.isCirclePreviewCompleted = true;
1254 1257 $("#canvasDiv").append("<div class='circle' style='border-radius:50%;border:1px dashed #000000;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>");
1255 1258 break;
1256 1259 case "Rectangle":
1257 1260 $(".rectangle").remove();
1258   -
  1261 + $rootScope.isRectanglePreviewCompleted = true;
1259 1262 $("#canvasDiv").append("<div class='rectangle' style='border:1px dashed #000000;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>");
1260 1263 break;
1261 1264 case "TextArea":
1262 1265 $(".textarea").remove();
1263   -
  1266 + $rootScope.isTextAreaPreviewCompleted = true;
1264 1267 $("#canvasDiv").append("<div class='textarea' style='border:1px dashed #000000;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>");
1265 1268 break;
1266 1269 }
... ... @@ -2160,10 +2163,10 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
2160 2163 $rootScope.startPageX = parseInt(event.clientX - ($("#canvas").offset().left));
2161 2164 $rootScope.startPageY = parseInt(event.clientY - ($("#canvas").offset().top));
2162 2165  
2163   - annotationCanvas.addEventListener('mousemove', $rootScope.OnPaintCanvasMouseMove, false);
  2166 + annotationCanvas.addEventListener('mousemove', $rootScope.OnPaintBrushCanvasMouseMove, false);
2164 2167  
2165 2168 }
2166   - $rootScope.OnPaintCanvasMouseMove = function (event) {
  2169 + $rootScope.OnPaintBrushCanvasMouseMove = function (event) {
2167 2170  
2168 2171 $rootScope.xPage = parseInt(event.clientX - ($("#canvas").offset().left));
2169 2172 $rootScope.yPage = parseInt(event.clientY - ($("#canvas").offset().top));
... ...