Commit dd601b777a778ad21f6a2325b275e7db6ab88ad9

Authored by Birendra
1 parent 744cfacf

fix bug in annotation tools

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -8720,7 +8720,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -8720,7 +8720,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8720 $scope.SetwindowStoreData(windowviewid,'zoomInOut',25); 8720 $scope.SetwindowStoreData(windowviewid,'zoomInOut',25);
8721 $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut')); 8721 $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut'));
8722 } 8722 }
8723 - 8723 + $rootScope.isLoading = true;
  8724 + $('#spinner').css('visibility', 'visible');
  8725 + var canDiv = document.getElementById('canvasDivDA_' + windowviewid);
  8726 + var canDivChildCount = canDiv.childElementCount;
  8727 + if (canDivChildCount > 0) {
  8728 + canDiv.innerHTML = '';
  8729 + }
8724 var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); 8730 var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId');
8725 $scope.CalculateImageCordinates(viewOrientationId,windowviewid); 8731 $scope.CalculateImageCordinates(viewOrientationId,windowviewid);
8726 8732
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -2660,7 +2660,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -2660,7 +2660,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2660 } 2660 }
2661 $rootScope.CIAnotationIdentifyModeOff = false; 2661 $rootScope.CIAnotationIdentifyModeOff = false;
2662 $rootScope.OnIdentifyClick = function () { 2662 $rootScope.OnIdentifyClick = function () {
2663 - 2663 + //clear sketch js event for paint and erase
  2664 + $.sketch = { tools: {}};
  2665 + $rootScope.shapeType = "";
  2666 + $(".btn-annotation").removeClass("activebtncolor");
2664 $("#OnIdentify").addClass("annotationtoolbartab"); 2667 $("#OnIdentify").addClass("annotationtoolbartab");
2665 $("#DrawMode").removeClass("annotationtoolbartab"); 2668 $("#DrawMode").removeClass("annotationtoolbartab");
2666 2669
@@ -2842,7 +2845,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -2842,7 +2845,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2842 } 2845 }
2843 2846
2844 $rootScope.DrawingMode = function () { 2847 $rootScope.DrawingMode = function () {
2845 - 2848 + //clear sketch js event for paint and erase
  2849 + $.sketch = { tools: {}};
2846 //Annotation History 2850 //Annotation History
2847 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 2851 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
2848 $("#OnIdentify").removeClass("annotationtoolbartab"); 2852 $("#OnIdentify").removeClass("annotationtoolbartab");
@@ -2917,6 +2921,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -2917,6 +2921,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2917 //----Annotation Toolbar: Jcanvas----- 2921 //----Annotation Toolbar: Jcanvas-----
2918 2922
2919 $rootScope.DrawLine = function (e) { 2923 $rootScope.DrawLine = function (e) {
  2924 + //clear sketch js event for paint and erase
  2925 + $.sketch = { tools: {}};
2920 $('.btnCursor').removeClass('activebtncolor'); 2926 $('.btnCursor').removeClass('activebtncolor');
2921 $(".btn-annotation").removeClass("activebtncolor"); 2927 $(".btn-annotation").removeClass("activebtncolor");
2922 $(".btn-annotation-line").addClass("activebtncolor"); 2928 $(".btn-annotation-line").addClass("activebtncolor");
@@ -2980,7 +2986,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -2980,7 +2986,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2980 } 2986 }
2981 2987
2982 $rootScope.DrawPin = function (e) { 2988 $rootScope.DrawPin = function (e) {
2983 - 2989 + //clear sketch js event for paint and erase
  2990 + $.sketch = { tools: {}};
2984 $('.btnCursor').removeClass('activebtncolor'); 2991 $('.btnCursor').removeClass('activebtncolor');
2985 $(".btn-annotation").removeClass("activebtncolor"); 2992 $(".btn-annotation").removeClass("activebtncolor");
2986 $(".btn-annotation-pin").addClass("activebtncolor"); 2993 $(".btn-annotation-pin").addClass("activebtncolor");
@@ -3022,7 +3029,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3022,7 +3029,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3022 3029
3023 } 3030 }
3024 3031
3025 - $rootScope.Cursor = function () { 3032 + $rootScope.Cursor = function () {
  3033 + //clear sketch js event for paint and erase
  3034 + $.sketch = { tools: {}};
3026 $rootScope.shapeType = "cursor"; 3035 $rootScope.shapeType = "cursor";
3027 $(".btn-annotation").removeClass("activebtncolor"); 3036 $(".btn-annotation").removeClass("activebtncolor");
3028 // $("#" + e.currentTarget.id).removeClass("activebtncolor"); 3037 // $("#" + e.currentTarget.id).removeClass("activebtncolor");
@@ -3051,7 +3060,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3051,7 +3060,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3051 } 3060 }
3052 3061
3053 $rootScope.DrawRectangle = function (e) { 3062 $rootScope.DrawRectangle = function (e) {
3054 - 3063 + //clear sketch js event for paint and erase
  3064 + $.sketch = { tools: {}};
3055 $('.btnCursor').removeClass('activebtncolor'); 3065 $('.btnCursor').removeClass('activebtncolor');
3056 $(".btn-annotation").removeClass("activebtncolor"); 3066 $(".btn-annotation").removeClass("activebtncolor");
3057 $(".btn-annotation-rectangle").addClass("activebtncolor"); 3067 $(".btn-annotation-rectangle").addClass("activebtncolor");
@@ -3152,13 +3162,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3152,13 +3162,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3152 } 3162 }
3153 3163
3154 $rootScope.shapeType = "FreeStylePaint"; 3164 $rootScope.shapeType = "FreeStylePaint";
3155 - var btnBrushSizeValue = $("#btnBrushSize").val();  
3156 - $rootScope.shapeSize = parseInt(btnBrushSizeValue);  
3157 - $("#annotationpaintbrushsize").attr("data-size", $rootScope.shapeSize); 3165 +
  3166 + $("#annotationpaintbrushsize").attr("data-size", parseInt($("#btnBrushSize").val()));
3158 3167
3159 $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity); 3168 $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity);
3160 3169
3161 - if ($rootScope.shapeSize == '') { 3170 + if (parseInt($("#btnBrushSize").val()) <1) {
3162 $("#" + canvasPaintId).sketch({ defaultSize: 1}); 3171 $("#" + canvasPaintId).sketch({ defaultSize: 1});
3163 } 3172 }
3164 else { 3173 else {
@@ -3195,12 +3204,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3195,12 +3204,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3195 3204
3196 $rootScope.isAnnotaionToolBarDrawingModeActive = true; 3205 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
3197 $rootScope.switchCanvasToPaintCanvas(paneld); 3206 $rootScope.switchCanvasToPaintCanvas(paneld);
3198 - var btneraseBrushSizeValue = $("#btnBrushSize").val();  
3199 - $rootScope.shapeSize = parseInt(btneraseBrushSizeValue);  
3200 3207
3201 $('#' + canvasPaintId).sketch(); 3208 $('#' + canvasPaintId).sketch();
3202 3209
3203 - $("#annotationpainteraser").attr("data-size", $rootScope.shapeSize); 3210 + $("#annotationpainteraser").attr("data-size", parseInt($("#btnBrushSize").val()));
3204 $scope.PaintEraseEvent(); 3211 $scope.PaintEraseEvent();
3205 } 3212 }
3206 } 3213 }
@@ -3219,14 +3226,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3219,14 +3226,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3219 this.stopPainting(); 3226 this.stopPainting();
3220 } 3227 }
3221 this.color= $rootScope.shapestyleColorWithOpacity!=undefined ? $rootScope.shapestyleColorWithOpacity : "#fff"; 3228 this.color= $rootScope.shapestyleColorWithOpacity!=undefined ? $rootScope.shapestyleColorWithOpacity : "#fff";
3222 - this.size=$rootScope.shapeSize; 3229 + this.size= parseInt($("#btnBrushSize").val());
3223 if ($("#annotationpaintbrushsize").hasClass("activebtncolor")) { 3230 if ($("#annotationpaintbrushsize").hasClass("activebtncolor")) {
3224 this.tool='marker'; 3231 this.tool='marker';
3225 this.startPainting(); 3232 this.startPainting();
3226 } 3233 }
3227 else if ($("#annotationpainteraser").hasClass("activebtncolor")) { 3234 else if ($("#annotationpainteraser").hasClass("activebtncolor")) {
3228 this.tool='eraser'; 3235 this.tool='eraser';
3229 - this.size=$rootScope.shapeSize>5?$rootScope.shapeSize:5; 3236 + this.size=parseInt($("#btnBrushSize").val())>5?parseInt($("#btnBrushSize").val()):5;
3230 this.startPainting(); 3237 this.startPainting();
3231 } 3238 }
3232 else 3239 else
@@ -3360,7 +3367,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3360,7 +3367,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3360 } 3367 }
3361 } 3368 }
3362 3369
3363 - $rootScope.DrawCircle = function (e) { 3370 + $rootScope.DrawCircle = function (e) {
  3371 + //clear sketch js event for paint and erase
  3372 + $.sketch = { tools: {}};
3364 $('.btnCursor').removeClass('activebtncolor'); 3373 $('.btnCursor').removeClass('activebtncolor');
3365 $(".btn-annotation").removeClass("activebtncolor"); 3374 $(".btn-annotation").removeClass("activebtncolor");
3366 $(".btn-annotation-circle").addClass("activebtncolor"); 3375 $(".btn-annotation-circle").addClass("activebtncolor");
@@ -3402,6 +3411,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3402,6 +3411,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3402 } 3411 }
3403 3412
3404 $rootScope.DrawArrow = function (e) { 3413 $rootScope.DrawArrow = function (e) {
  3414 + //clear sketch js event for paint and erase
  3415 + $.sketch = { tools: {}};
3405 $('.btnCursor').removeClass('activebtncolor'); 3416 $('.btnCursor').removeClass('activebtncolor');
3406 $(".btn-annotation").removeClass("activebtncolor"); 3417 $(".btn-annotation").removeClass("activebtncolor");
3407 $(".btn-annotation-arrow").addClass("activebtncolor"); 3418 $(".btn-annotation-arrow").addClass("activebtncolor");
@@ -3442,6 +3453,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3442,6 +3453,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3442 } 3453 }
3443 } 3454 }
3444 $rootScope.DrawText = function () { 3455 $rootScope.DrawText = function () {
  3456 + //clear sketch js event for paint and erase
  3457 + $.sketch = { tools: {}};
3445 $('.btnCursor').removeClass('activebtncolor'); 3458 $('.btnCursor').removeClass('activebtncolor');
3446 $(".btn-annotation").removeClass("activebtncolor"); 3459 $(".btn-annotation").removeClass("activebtncolor");
3447 $(".btn-annotation-Text").addClass("activebtncolor"); 3460 $(".btn-annotation-Text").addClass("activebtncolor");
@@ -3484,6 +3497,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3484,6 +3497,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3484 } 3497 }
3485 3498
3486 $rootScope.DrawPolygon = function () { 3499 $rootScope.DrawPolygon = function () {
  3500 + //clear sketch js event for paint and erase
  3501 + $.sketch = { tools: {}};
3487 $("#OnIdentify").removeClass('annotationtoolbartab'); 3502 $("#OnIdentify").removeClass('annotationtoolbartab');
3488 $("#DrawMode").addClass('annotationtoolbartab'); 3503 $("#DrawMode").addClass('annotationtoolbartab');
3489 3504
@@ -4516,7 +4531,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -4516,7 +4531,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4516 strokeStyle: shapestyleborderColor, 4531 strokeStyle: shapestyleborderColor,
4517 strokeWidth: shapestyleborderWidth, 4532 strokeWidth: shapestyleborderWidth,
4518 rounded: true, 4533 rounded: true,
4519 - startArrow: true, 4534 + endArrow: true,
4520 arrowRadius: 7, 4535 arrowRadius: 7,
4521 arrowAngle: 90, 4536 arrowAngle: 90,
4522 x1: offsetX1, y1: offsetY1, 4537 x1: offsetX1, y1: offsetY1,
@@ -4778,7 +4793,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -4778,7 +4793,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4778 strokeStyle: 'grey', 4793 strokeStyle: 'grey',
4779 strokeWidth: shapestyleborderWidth, 4794 strokeWidth: shapestyleborderWidth,
4780 fillStyle: radial, 4795 fillStyle: radial,
4781 - x: offsetX1, y: offsetY1, 4796 + x: x, y: y,
4782 radius: 5, 4797 radius: 5,
4783 add: function (layer) { 4798 add: function (layer) {
4784 layer.draggable = false; 4799 layer.draggable = false;
@@ -5641,7 +5656,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5641,7 +5656,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5641 5656
5642 //Birendra updated due to some issue 5657 //Birendra updated due to some issue
5643 $rootScope.OnPaintCanvasMouseDown = function (event) { 5658 $rootScope.OnPaintCanvasMouseDown = function (event) {
5644 - event.preventDefault(); 5659 + event.preventDefault();
5645 if ($rootScope.isAnnotatiomToolBarPopupClosed == false) { 5660 if ($rootScope.isAnnotatiomToolBarPopupClosed == false) {
5646 if ($rootScope.shapeType==undefined || $rootScope.shapeType=='cursor'||$rootScope.shapeType=="") { 5661 if ($rootScope.shapeType==undefined || $rootScope.shapeType=='cursor'||$rootScope.shapeType=="") {
5647 return; 5662 return;
@@ -5688,12 +5703,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5688,12 +5703,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5688 //Birendra updated due to some issue 5703 //Birendra updated due to some issue
5689 $rootScope.OnPaintCanvasMouseUp = function (event) { 5704 $rootScope.OnPaintCanvasMouseUp = function (event) {
5690 event.preventDefault(); 5705 event.preventDefault();
  5706 +
5691 if ($rootScope.isAnnotatiomToolBarPopupClosed == false) { 5707 if ($rootScope.isAnnotatiomToolBarPopupClosed == false) {
5692 if ($rootScope.shapeType==undefined || $rootScope.shapeType=='cursor'||$rootScope.shapeType=="") { 5708 if ($rootScope.shapeType==undefined || $rootScope.shapeType=='cursor'||$rootScope.shapeType=="") {
5693 return; 5709 return;
5694 } 5710 }
5695 $rootScope.clicked=false; 5711 $rootScope.clicked=false;
5696 - if (isDrawing === true) { 5712 + if (isDrawing === true) {
5697 isDrawing = false; 5713 isDrawing = false;
5698 $(".line").remove(); 5714 $(".line").remove();
5699 $(".arrow").remove(); 5715 $(".arrow").remove();
@@ -5820,7 +5836,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5820,7 +5836,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5820 if ($rootScope.shapeType==undefined || $rootScope.shapeType=='cursor'||$rootScope.shapeType=="") { 5836 if ($rootScope.shapeType==undefined || $rootScope.shapeType=='cursor'||$rootScope.shapeType=="") {
5821 return; 5837 return;
5822 } 5838 }
5823 - if ($rootScope.clicked == true) { 5839 + if ($rootScope.clicked == true) {
5824 var canvasElement=event.target; 5840 var canvasElement=event.target;
5825 if (canvasElement!= null || canvasElement != undefined) 5841 if (canvasElement!= null || canvasElement != undefined)
5826 { 5842 {
@@ -5828,7 +5844,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5828,7 +5844,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5828 if (canvasId != null ||canvasId != undefined) 5844 if (canvasId != null ||canvasId != undefined)
5829 { 5845 {
5830 if(canvasId.match("canvasDA")||canvasId.match("canvasAA")||canvasId.match("canvasCI")||canvasId.match("canvasAI")||canvasId.match("canvasPIC")) 5846 if(canvasId.match("canvasDA")||canvasId.match("canvasAA")||canvasId.match("canvasCI")||canvasId.match("canvasAI")||canvasId.match("canvasPIC"))
5831 - { 5847 + {
5832 var canvasDiv = (event.target.parentElement); 5848 var canvasDiv = (event.target.parentElement);
5833 var canvasDivId = canvasDiv.id; 5849 var canvasDivId = canvasDiv.id;
5834 isDrawing = true; 5850 isDrawing = true;
@@ -5841,19 +5857,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5841,19 +5857,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5841 case "Line": 5857 case "Line":
5842 $(".line").remove(); 5858 $(".line").remove();
5843 $rootScope.isLinePreviewCompleted = true; 5859 $rootScope.isLinePreviewCompleted = true;
5844 - $("#" + canvasDivId).append("<div class='line' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); 5860 + $("#" + canvasDivId).append("<div class='line' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;'></div>");
5845 $rootScope.Annotationangle(); 5861 $rootScope.Annotationangle();
5846 break; 5862 break;
5847 case "Arrow": 5863 case "Arrow":
5848 $(".arrow").remove(); 5864 $(".arrow").remove();
5849 $rootScope.isArrowPreviewCompleted = true; 5865 $rootScope.isArrowPreviewCompleted = true;
5850 - $("#" + canvasDivId).append("<div class='arrow' style='z-index:12001;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>"); 5866 + $("#" + canvasDivId).append("<div class='arrow' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div class='arrowPoint' style='border-bottom: 9px solid transparent;border-left: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;position: absolute;top: -8px;width: 0;'></div></div>");
5851 $rootScope.Annotationangle(); 5867 $rootScope.Annotationangle();
5852 break; 5868 break;
5853 case "Pin": 5869 case "Pin":
5854 $(".pin").remove(); 5870 $(".pin").remove();
5855 $rootScope.isPinPreviewCompleted = true; 5871 $rootScope.isPinPreviewCompleted = true;
5856 - $("#" + canvasDivId).append("<div class='pin' style='z-index:12001;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>"); 5872 + $("#" + canvasDivId).append("<div class='pin' style='z-index:12001;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + ($rootScope.offsetY1+5) + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div class='pinPoint' style='background-color:#fff;left:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;position: absolute;top: -6px;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>");
5857 $rootScope.Annotationangle(); 5873 $rootScope.Annotationangle();
5858 break; 5874 break;
5859 case "Circle": 5875 case "Circle":
@@ -5917,9 +5933,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5917,9 +5933,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5917 break; 5933 break;
5918 case "Arrow": 5934 case "Arrow":
5919 $('.arrow').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' }); 5935 $('.arrow').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
  5936 + $('.arrowPoint').css({ 'left': dottedLineWidth + 'px' });
5920 break; 5937 break;
5921 case "Pin": 5938 case "Pin":
5922 $('.pin').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' }); 5939 $('.pin').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' });
  5940 + $('.pinPoint').css({ 'left': dottedLineWidth + 'px' });
5923 break; 5941 break;
5924 case "Circle": 5942 case "Circle":
5925 var classname=".circle" 5943 var classname=".circle"
400-SOURCECODE/AIAHTML5.Web/index.aspx
@@ -1807,12 +1807,12 @@ @@ -1807,12 +1807,12 @@
1807 <script> 1807 <script>
1808 $(function () { 1808 $(function () {
1809 function onBrushSizeChange() { 1809 function onBrushSizeChange() {
1810 - $('.btnCursor').trigger('click');  
1811 - $('.btnCursor').addClass('activebtncolor');  
1812 - $(".btn-annotation").removeClass("activebtncolor");  
1813 - $(".btn-annotation-erase").removeClass("activebtncolor");  
1814 - $(".btn-annotation-erase").removeClass("activebtncolor");  
1815 - $(".annotationpaintbrushsize").removeClass("activebtncolor"); 1810 + //$('.btnCursor').trigger('click');
  1811 + // $('.btnCursor').addClass('activebtncolor');
  1812 + // $(".btn-annotation").removeClass("activebtncolor");
  1813 + // $(".btn-annotation-erase").removeClass("activebtncolor");
  1814 + // $(".btn-annotation-erase").removeClass("activebtncolor");
  1815 + // $(".annotationpaintbrushsize").removeClass("activebtncolor");
1816 var x = $('#canvasPaint').css("z-index"); 1816 var x = $('#canvasPaint').css("z-index");
1817 1817
1818 var y = $('#canvas').css("z-index"); 1818 var y = $('#canvas').css("z-index");
400-SOURCECODE/AIAHTML5.Web/libs/sketch.js
@@ -106,9 +106,13 @@ var __slice = Array.prototype.slice; @@ -106,9 +106,13 @@ var __slice = Array.prototype.slice;
106 e.pageX = e.originalEvent.targetTouches[0].pageX; 106 e.pageX = e.originalEvent.targetTouches[0].pageX;
107 e.pageY = e.originalEvent.targetTouches[0].pageY; 107 e.pageY = e.originalEvent.targetTouches[0].pageY;
108 } 108 }
109 - $.sketch.tools[$(this).data('sketch').tool].onEvent.call($(this).data('sketch'), e);  
110 - e.preventDefault();  
111 - return false; 109 + if($.sketch.tools[$(this).data('sketch').tool]!=undefined) //Birendra-after paint/erase create problem while drawing other shape
  110 + {
  111 + $.sketch.tools[$(this).data('sketch').tool].onEvent.call($(this).data('sketch'), e);
  112 + e.preventDefault();
  113 + return false;
  114 + }
  115 +
112 }; 116 };
113 Sketch.prototype.redraw = function() { 117 Sketch.prototype.redraw = function() {
114 var sketch; 118 var sketch;