Commit 316f0f484896a8fa62d4f688f002a8e86d21da6c
Merge branch 'MerginIssueResolved' into Develop
Showing
2 changed files
with
19 additions
and
16 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -563,7 +563,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -563,7 +563,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
563 | theme: 'success', | 563 | theme: 'success', |
564 | currentController: 'CIController', | 564 | currentController: 'CIController', |
565 | parentSlug: 'clinical-illustrations', | 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 | '<div class="col-sm-12 img-thumbnail" align="center">' + | 567 | '<div class="col-sm-12 img-thumbnail" align="center">' + |
568 | '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well">' + | 568 | '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well">' + |
569 | '<div align="left" id="sid"><p>' + $scope.clickedCISummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button>' + | 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("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -457,7 +457,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
457 | } | 457 | } |
458 | $rootScope.EraseDrawing = function () { | 458 | $rootScope.EraseDrawing = function () { |
459 | $rootScope.switchCanvas(); | 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("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1120,6 +1121,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1120 | // var y = event.clientY; | 1121 | // var y = event.clientY; |
1121 | $rootScope.offsetX1 = 0; | 1122 | $rootScope.offsetX1 = 0; |
1122 | $rootScope.offsetY1 = 0; | 1123 | $rootScope.offsetY1 = 0; |
1124 | + //alert($location.path()); | ||
1125 | + | ||
1123 | var canvasDiv = document.getElementById('canvasDiv'); | 1126 | var canvasDiv = document.getElementById('canvasDiv'); |
1124 | var verticalScrollPosition = canvasDiv.scrollTop; | 1127 | var verticalScrollPosition = canvasDiv.scrollTop; |
1125 | var horizontlScrollPosition = canvasDiv.scrollLeft; | 1128 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
@@ -1180,30 +1183,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1180,30 +1183,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1180 | break; | 1183 | break; |
1181 | case "Line": | 1184 | case "Line": |
1182 | $rootScope.LineNumber = $rootScope.ObjectIndex++; | 1185 | $rootScope.LineNumber = $rootScope.ObjectIndex++; |
1183 | - $rootScope.isLinePreviewCompleted = true; | 1186 | + // $rootScope.isLinePreviewCompleted = true; |
1184 | $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) | 1187 | $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) |
1185 | break; | 1188 | break; |
1186 | case "Rectangle": | 1189 | case "Rectangle": |
1187 | $rootScope.rectNumber = $rootScope.ObjectIndex++; | 1190 | $rootScope.rectNumber = $rootScope.ObjectIndex++; |
1188 | - $rootScope.isRectanglePreviewCompleted = true; | 1191 | + // $rootScope.isRectanglePreviewCompleted = true; |
1189 | $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 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 | break; | 1194 | break; |
1192 | case "Circle": | 1195 | case "Circle": |
1193 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; | 1196 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; |
1194 | - $rootScope.isCirclePreviewCompleted = true; | 1197 | + // $rootScope.isCirclePreviewCompleted = true; |
1195 | $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1198 | $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1196 | break; | 1199 | break; |
1197 | case "Arrow": | 1200 | case "Arrow": |
1198 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; | 1201 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; |
1199 | - $rootScope.isArrowPreviewCompleted = true; | 1202 | + //$rootScope.isArrowPreviewCompleted = true; |
1200 | $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1203 | $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1201 | break; | 1204 | break; |
1202 | case "Pin": | 1205 | case "Pin": |
1203 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; | 1206 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; |
1204 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; | 1207 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; |
1205 | 1208 | ||
1206 | - $rootScope.isPinPreviewCompleted = true; | 1209 | + //$rootScope.isPinPreviewCompleted = true; |
1207 | 1210 | ||
1208 | $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); | 1211 | $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); |
1209 | break; | 1212 | break; |
@@ -1213,7 +1216,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1213,7 +1216,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1213 | // Draw text | 1216 | // Draw text |
1214 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; | 1217 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; |
1215 | $rootScope.TextNumber = $rootScope.ObjectIndex++; | 1218 | $rootScope.TextNumber = $rootScope.ObjectIndex++; |
1216 | - $rootScope.isTextAreaPreviewCompleted = true; | 1219 | + // $rootScope.isTextAreaPreviewCompleted = true; |
1217 | $rootScope.TextEditorFunctionality('#canvas', $rootScope.TextNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.resetTextRect, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.x, $rootScope.y); | 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 | break; | 1221 | break; |
1219 | case "DrawPolygon": | 1222 | case "DrawPolygon": |
@@ -1232,35 +1235,35 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1232,35 +1235,35 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1232 | switch ($rootScope.shapeType) { | 1235 | switch ($rootScope.shapeType) { |
1233 | case "Line": | 1236 | case "Line": |
1234 | $(".line").remove(); | 1237 | $(".line").remove(); |
1235 | - | 1238 | + $rootScope.isLinePreviewCompleted = true; |
1236 | $("#canvasDiv").append("<div class='line' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); | 1239 | $("#canvasDiv").append("<div class='line' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); |
1237 | $rootScope.Annotationangle(); | 1240 | $rootScope.Annotationangle(); |
1238 | break; | 1241 | break; |
1239 | case "Arrow": | 1242 | case "Arrow": |
1240 | $(".arrow").remove(); | 1243 | $(".arrow").remove(); |
1241 | - | 1244 | + $rootScope.isArrowPreviewCompleted = true; |
1242 | $("#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>"); | 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 | $rootScope.Annotationangle(); | 1246 | $rootScope.Annotationangle(); |
1244 | break; | 1247 | break; |
1245 | case "Pin": | 1248 | case "Pin": |
1246 | $(".pin").remove(); | 1249 | $(".pin").remove(); |
1247 | - | 1250 | + $rootScope.isPinPreviewCompleted = true; |
1248 | $("#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>"); | 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 | $rootScope.Annotationangle(); | 1252 | $rootScope.Annotationangle(); |
1250 | break; | 1253 | break; |
1251 | case "Circle": | 1254 | case "Circle": |
1252 | $(".circle").remove(); | 1255 | $(".circle").remove(); |
1253 | - | 1256 | + $rootScope.isCirclePreviewCompleted = true; |
1254 | $("#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>"); | 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 | break; | 1258 | break; |
1256 | case "Rectangle": | 1259 | case "Rectangle": |
1257 | $(".rectangle").remove(); | 1260 | $(".rectangle").remove(); |
1258 | - | 1261 | + $rootScope.isRectanglePreviewCompleted = true; |
1259 | $("#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>"); | 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 | break; | 1263 | break; |
1261 | case "TextArea": | 1264 | case "TextArea": |
1262 | $(".textarea").remove(); | 1265 | $(".textarea").remove(); |
1263 | - | 1266 | + $rootScope.isTextAreaPreviewCompleted = true; |
1264 | $("#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>"); | 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 | break; | 1268 | break; |
1266 | } | 1269 | } |
@@ -2160,10 +2163,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2160,10 +2163,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2160 | $rootScope.startPageX = parseInt(event.clientX - ($("#canvas").offset().left)); | 2163 | $rootScope.startPageX = parseInt(event.clientX - ($("#canvas").offset().left)); |
2161 | $rootScope.startPageY = parseInt(event.clientY - ($("#canvas").offset().top)); | 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 | $rootScope.xPage = parseInt(event.clientX - ($("#canvas").offset().left)); | 2171 | $rootScope.xPage = parseInt(event.clientX - ($("#canvas").offset().left)); |
2169 | $rootScope.yPage = parseInt(event.clientY - ($("#canvas").offset().top)); | 2172 | $rootScope.yPage = parseInt(event.clientY - ($("#canvas").offset().top)); |