Commit 8fefb59f3d3e789a1d159bb0fbd3d69c9ec5f9e9

Authored by unknown
1 parent 2ea0d8bf

Resolved line issue, pin issue and replicated a code for annotation toolbar in different views.

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -724,6 +724,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -724,6 +724,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
724 //calculate coordinates for body region images 724 //calculate coordinates for body region images
725 $scope.CalculateImageCordinates = function (viewOrientationId) { 725 $scope.CalculateImageCordinates = function (viewOrientationId) {
726 726
  727 + // annotation toolbar canvas
  728 + if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {
  729 +
  730 + $("#canvasDiv").append('<canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" ng-click="doClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>');
  731 + $scope.doClick();
  732 + $rootScope.FreeStylePaint();
  733 +
  734 + }
  735 +
727 $scope.terminateCurrentlyRunningWPs(); 736 $scope.terminateCurrentlyRunningWPs();
728 737
729 var drawnBodyRegionCount = []; 738 var drawnBodyRegionCount = [];
@@ -1421,14 +1430,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -1421,14 +1430,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1421 context.drawImage(img, 0, 0); 1430 context.drawImage(img, 0, 0);
1422 context.restore(); 1431 context.restore();
1423 1432
1424 -  
1425 - if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {  
1426 -  
1427 - $("#canvasDiv").append('<canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" ng-click="doClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>');  
1428 - $scope.doClick();  
1429 - $rootScope.FreeStylePaint();  
1430 -  
1431 - }  
1432 1433
1433 if (isMaskImage == 'N') { 1434 if (isMaskImage == 'N') {
1434 1435
@@ -1754,14 +1755,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -1754,14 +1755,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1754 context.drawImage(img, 0, 0); 1755 context.drawImage(img, 0, 0);
1755 1756
1756 1757
1757 - if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {  
1758 -  
1759 - $("#canvasDiv").append('<canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" ng-click="doClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>');  
1760 - $scope.doClick();  
1761 - $rootScope.FreeStylePaint();  
1762 -  
1763 - }  
1764 -  
1765 1758
1766 if (isMaskImage == 'N') { 1759 if (isMaskImage == 'N') {
1767 if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') { 1760 if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
@@ -2559,6 +2552,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -2559,6 +2552,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2559 $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) 2552 $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
2560 $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) 2553 $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition)
2561 2554
  2555 +
2562 if ( $rootScope.isHighlightBodyByBodySystem) { 2556 if ( $rootScope.isHighlightBodyByBodySystem) {
2563 $timeout(function () { $scope.DisableProgressBar() }, 20000); 2557 $timeout(function () { $scope.DisableProgressBar() }, 20000);
2564 } 2558 }
@@ -6034,6 +6028,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6034,6 +6028,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6034 $rootScope.resetText = 0; 6028 $rootScope.resetText = 0;
6035 $rootScope.resetTextSave = 0; 6029 $rootScope.resetTextSave = 0;
6036 $rootScope.ObjectIndexSave = 0; 6030 $rootScope.ObjectIndexSave = 0;
  6031 +
6037 var arrayRect = {}; 6032 var arrayRect = {};
6038 6033
6039 6034
@@ -6081,7 +6076,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6081,7 +6076,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6081 break; 6076 break;
6082 6077
6083 case "Line": 6078 case "Line":
6084 - 6079 +
6085 $rootScope.resetLine = $rootScope.ObjectIndex++; 6080 $rootScope.resetLine = $rootScope.ObjectIndex++;
6086 $('#canvas').addLayer({ 6081 $('#canvas').addLayer({
6087 name: 'Line_' + $rootScope.resetLine, 6082 name: 'Line_' + $rootScope.resetLine,
@@ -6093,7 +6088,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6093,7 +6088,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6093 rounded: true, 6088 rounded: true,
6094 x1: $scope.offsetX1, y1: $scope.offsetY1, 6089 x1: $scope.offsetX1, y1: $scope.offsetY1,
6095 x2: $scope.x, y2: $scope.y, 6090 x2: $scope.x, y2: $scope.y,
6096 - 6091 +
6097 click: function (layer) { 6092 click: function (layer) {
6098 $rootScope.canvasLayerNameCollection = []; 6093 $rootScope.canvasLayerNameCollection = [];
6099 $rootScope.canvasLayerNameCollection.push(layer.name); 6094 $rootScope.canvasLayerNameCollection.push(layer.name);
@@ -6242,7 +6237,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6242,7 +6237,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6242 6237
6243 6238
6244 click: function (layer) { 6239 click: function (layer) {
6245 - // alert(layer.name); 6240 +
6246 $rootScope.canvasLayerNameCollection = []; 6241 $rootScope.canvasLayerNameCollection = [];
6247 $rootScope.canvasLayerNameCollection.push(layer.name); 6242 $rootScope.canvasLayerNameCollection.push(layer.name);
6248 $('#canvas').setLayer(layer.name, { 6243 $('#canvas').setLayer(layer.name, {
@@ -6570,6 +6565,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6570,6 +6565,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6570 6565
6571 } 6566 }
6572 6567
  6568 +
  6569 +
6573 //-- TextArea functionality of Annotation toolbar 6570 //-- TextArea functionality of Annotation toolbar
6574 6571
6575 $rootScope.fontSizes; 6572 $rootScope.fontSizes;
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -89,15 +89,15 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -89,15 +89,15 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
89 } 89 }
90 } 90 }
91 91
92 - $rootScope.DrawLine = function () { 92 + // $rootScope.DrawLine = function () {
93 //$rootScope.isIdetifyClicked = false; 93 //$rootScope.isIdetifyClicked = false;
94 //$rootScope.isDrawingToolSelected = true; 94 //$rootScope.isDrawingToolSelected = true;
95 //$rootScope.isLineDrawSelecyed = true; 95 //$rootScope.isLineDrawSelecyed = true;
96 - $rootScope.shapeType = "Line"; 96 + // $rootScope.shapeType = "Line";
97 // alert($rootScope.shapeType); 97 // alert($rootScope.shapeType);
98 98
99 99
100 - } 100 + // }
101 101
102 $rootScope.ClearIframe = function () { 102 $rootScope.ClearIframe = function () {
103 if ($('#daImagePanel') != null) 103 if ($('#daImagePanel') != null)
@@ -159,20 +159,26 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -159,20 +159,26 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
159 159
160 //----Annotation Toolbar: Jcanvas----- 160 //----Annotation Toolbar: Jcanvas-----
161 161
162 - $rootScope.DrawLine = function (e) { 162 + $rootScope.DrLine = function (e) {
  163 +
  164 + $("#canvasPaint").css("display", "block");
  165 + $("#canvas").css("display", "block");
  166 +
163 $rootScope.switchCanvas(); 167 $rootScope.switchCanvas();
164 $rootScope.shapeType = "Line"; 168 $rootScope.shapeType = "Line";
165 -  
166 - 169 +
167 $('.btnCursor').removeClass('activebtncolor'); 170 $('.btnCursor').removeClass('activebtncolor');
168 - $(".btn-annotation").removeClass("activebtncolor");  
169 - $(".btn-annotation-line").addClass("activebtncolor");  
170 - 171 + $(".btn-annotation").removeClass("activebtncolor");
  172 + $(".btn-annotation-line").addClass("activebtncolor");
171 173
172 } 174 }
173 175
174 176
175 - $rootScope.DrawPin = function (e) { 177 + $rootScope.DrPin = function (e) {
  178 + $("#canvasPaint").css("display", "block");
  179 + $("#canvas").css("display", "block");
  180 +
  181 + $rootScope.switchCanvas();
176 $rootScope.switchCanvas(); 182 $rootScope.switchCanvas();
177 $rootScope.shapeType = "Pin"; 183 $rootScope.shapeType = "Pin";
178 184
@@ -191,6 +197,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -191,6 +197,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
191 } 197 }
192 198
193 $rootScope.DrawRectangle = function (e) { 199 $rootScope.DrawRectangle = function (e) {
  200 +
194 $("#canvasPaint").css("display", "block"); 201 $("#canvasPaint").css("display", "block");
195 $("#canvas").css("display", "block"); 202 $("#canvas").css("display", "block");
196 $rootScope.switchCanvas(); 203 $rootScope.switchCanvas();
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -431,12 +431,12 @@ @@ -431,12 +431,12 @@
431 <div class="" role="" aria-label="..."> 431 <div class="" role="" aria-label="...">
432 <div class="" role="group" align="center"> 432 <div class="" role="group" align="center">
433 <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" data-toggle="tooltip" data-placement="top" title="Select Shapes(S)" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> 433 <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" data-toggle="tooltip" data-placement="top" title="Select Shapes(S)" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button>
434 - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" data-toggle="tooltip" data-placement="top" title="Draw Pin" ng-click="DrawPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> 434 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" data-toggle="tooltip" data-placement="top" title="Draw Pin" ng-click="DrPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button>
435 <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" data-toggle="tooltip" data-placement="top" title="Draw Arrow" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> 435 <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" data-toggle="tooltip" data-placement="top" title="Draw Arrow" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button>
436 <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" data-toggle="tooltip" data-placement="top" title="Draw Text" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> 436 <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" data-toggle="tooltip" data-placement="top" title="Draw Text" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button>
437 </div> 437 </div>
438 <div class="" role="group" align="center"> 438 <div class="" role="group" align="center">
439 - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" data-toggle="tooltip" data-placement="top" title="Draw Line" ng-click="DrawLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> 439 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" data-toggle="tooltip" data-placement="top" title="Draw Line" ng-click="DrLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button>
440 <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" data-toggle="tooltip" data-placement="top" title="Draw Rectangle" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> 440 <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" data-toggle="tooltip" data-placement="top" title="Draw Rectangle" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button>
441 <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" data-toggle="tooltip" data-placement="top" title="Draw Circle" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> 441 <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" data-toggle="tooltip" data-placement="top" title="Draw Circle" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button>
442 <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" data-toggle="tooltip" data-placement="top" title="Draw Polygon" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button> 442 <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" data-toggle="tooltip" data-placement="top" title="Draw Polygon" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button>