diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 527803b..00e0c38 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -780,9 +780,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //history code if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { - var annotationAppendedCanvas = $("#canvasDiv").append(''); - $compile(annotationAppendedCanvas)($scope); - $scope.BindCanvasDrawingListners(); + var ATBarHtml = $("#canvasDiv").append(''); + $compile(ATBarHtml)($scope); + $scope.onDrawingCanvasClick(); // $rootScope.FreeStylePaint(); } @@ -792,7 +792,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // var $layerChange = $("#canvasDiv").append(''); // $compile($layerChange)($scope); - // $scope.BindCanvasDrawingListners(); + // $scope.onDrawingCanvasClick(); // // $rootScope.FreeStylePaint(); //} @@ -3000,7 +3000,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$("#bord").css({ "width": "0px", "display": "none" }); //history maintained issue - if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { $("#sppeachBubble").remove(); $("#dot").remove(); } @@ -3111,7 +3111,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //history maintained issue - if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { document.getElementById('sppeachBubble').style.zIndex = "100000000000"; } + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble').style.zIndex = "100000000000"; } @@ -4674,7 +4674,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // History Maintained Issue// - $rootScope.DrawingListners_Canvas = function (event) { + $rootScope.getAnnotationTextBasedOnSelectedBodyRegion = function (event) { var canvasDiv = document.getElementById('canvasDiv'); @@ -4686,38 +4686,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.Yaxis = event.pageY - $('#canvasDiv').offset().top + verticalScrollPosition; - $rootScope.getBodyRegionID(); + $rootScope.setSelectedBodyRegionData(); - if ($rootScope.MaskedCanvasMrImageForAnotation == "No") { - var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_mci"; - var maskCanvas = document.getElementById(maskCanvasIdForAnnotation); + if ($rootScope.isMirrorBodyRegion == "No") { + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci"; + var maskCanvas = document.getElementById(maskCanvasId); var maskCanvasContext = maskCanvas.getContext("2d"); - var canvasDiv = document.getElementById('canvasDiv'); - var verticalScrollPosition = canvasDiv.scrollTop; - var horizontlScrollPosition = canvasDiv.scrollLeft; + //var canvasDiv = document.getElementById('canvasDiv'); + //var verticalScrollPosition = canvasDiv.scrollTop; + //var horizontlScrollPosition = canvasDiv.scrollLeft; var actulalX = $rootScope.Xaxis; var actualY = $rootScope.Yaxis; - var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, $rootScope.MaskedCanvasXForAnotation, $rootScope.MaskedCanvasYForAnotation); + var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, $rootScope.BodyRegionXAxis, $rootScope.BodyRegionYAxis); var annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); } else { - var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_MR_mci"; - var maskoffsetval = $('#' + maskCanvasIdForAnnotation).offset(); + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"; + var maskoffsetval = $('#' + maskCanvasId).offset(); var mirrorCanvasX = maskoffsetval.left; //alert(mirrorCanvasX); - var mirrorImageCanvas = document.getElementById(maskCanvasIdForAnnotation); + var mirrorImageCanvas = document.getElementById(maskCanvasId); var mirrorCanvasWidth = mirrorImageCanvas.clientWidth; // alert(mirrorCanvasWidth); - var maskCanvas = document.getElementById(maskCanvasIdForAnnotation); + var maskCanvas = document.getElementById(maskCanvasId); var maskCanvasContext = maskCanvas.getContext("2d"); var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(event.pageX) + horizontlScrollPosition);// - 135); var mirrorXOnNormalImage = parseInt(maskCanvasContext.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage); var actulalX = mirrorXOnNormalImage; var actualY = event.pageY + verticalScrollPosition; - var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - parseInt(maskCanvasContext.canvas.offsetLeft)), Math.round(actualY - $rootScope.MaskedCanvasYForAnotation), 1, 1); + var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - parseInt(maskCanvasContext.canvas.offsetLeft)), Math.round(actualY - $rootScope.BodyRegionYAxis), 1, 1); pixelData.data[0] = pixelData.data[0] - 9; pixelData.data[1] = pixelData.data[1] - 9; pixelData.data[2] = pixelData.data[2] - 9 @@ -4749,7 +4749,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - // var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_mci"; + // var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci"; // alert(annotationText); $scope.MultiLanguageAnnationArray = []; @@ -4764,17 +4764,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - $rootScope.getBodyRegionID = function () { + $rootScope.setSelectedBodyRegionData = function () { var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; $.each(BodyRegionDictionary, function (index, value) { var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); if ($rootScope.Xaxis <= bodyRegionRight && $rootScope.Yaxis <= bodyRegionBottom && value.X <= $rootScope.Xaxis && value.Y <= $rootScope.Yaxis) { - $rootScope.MaskedCanvasIDForAnnotation = value.bodyRegionId; - $rootScope.MaskedCanvasXForAnotation = value.X; - $rootScope.MaskedCanvasYForAnotation = value.Y; - $rootScope.MaskedCanvasMrImageForAnotation = value.IsMirror; + $rootScope.BRId = value.bodyRegionId; + $rootScope.BodyRegionXAxis = value.X; + $rootScope.BodyRegionYAxis = value.Y; + $rootScope.isMirrorBodyRegion = value.IsMirror; return false; } }); @@ -7027,7 +7027,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $("#canvas").css("display", "block"); $("#canvasPaint").css("display", "block"); - $rootScope.BindCanvasDrawingListners(); + $rootScope.onDrawingCanvasClick(); $rootScope.FreeStylePaint(); }); $scope.mousePs; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 0ced8eb..1f04e38 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -267,7 +267,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } - $rootScope.isAnnotaionToolBarDrawingModeActive = true; + $rootScope.isAnnotaionToolBarDrawingModeActive = false; $rootScope.switchCanvas(); } @@ -275,7 +275,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.DrawingMode = function () { //Annotation History - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $("#OnIdentify").removeClass("annotationtoolbartab"); $("#DrawMode").addClass("annotationtoolbartab"); $('.btnCursor').addClass('activebtncolor'); @@ -572,7 +572,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", x2: x, y2: y, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); @@ -588,11 +589,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $(canvasId).setLayer(layer.name, { @@ -607,12 +610,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $(canvasId).setLayer(layer.name, { @@ -626,6 +631,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } } @@ -664,7 +670,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); @@ -680,11 +687,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $(canvasId).setLayer(layer.name, { @@ -700,11 +709,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $(canvasId).setLayer(layer.name, { @@ -719,6 +730,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } } @@ -750,7 +762,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", resizeFromCenter: false, handlePlacement: 'both', click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); @@ -765,11 +778,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; @@ -790,7 +805,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $(canvasId).setLayer(layer.name, { @@ -805,6 +821,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } } @@ -832,7 +849,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", x2: x, y2: y, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); @@ -849,12 +867,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", // $("#canvas").removeLayer(layer.name).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $(canvasId).setLayer(layer.name, { @@ -870,12 +890,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $(canvasId).setLayer(layer.name, { handle: { @@ -889,6 +911,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } } @@ -924,7 +947,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", x2: x, y2: y, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.shapeTypePin = "Pin"; $rootScope.canvasLayerNameCollection = []; @@ -948,11 +972,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $(canvasId).setLayer(layer.name, { @@ -968,12 +994,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $(canvasId).setLayer(layer.name, { handle: { @@ -987,6 +1015,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } } @@ -1069,7 +1098,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); @@ -1085,11 +1115,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, dblclick: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.IsTextAlreadySave = false; var RectNameArray = (layer.name).split("_"); @@ -1125,11 +1157,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $("#text-center").removeClass("ActiveFormattingButtonClass"); } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $('#canvas').setLayer(layer.name, { @@ -1145,11 +1179,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $('#canvas').setLayer(layer.name, { handle: { @@ -1164,6 +1200,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } else { + //jcanvas property layer.draggable = false; } } @@ -1287,32 +1324,32 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", PaintCanvasctx.beginPath(); break; case "Line": - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $rootScope.LineNumber = $rootScope.ObjectIndex++; // $rootScope.isLinePreviewCompleted = true; $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) break; case "Rectangle": - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $rootScope.rectNumber = $rootScope.ObjectIndex++; // $rootScope.isRectanglePreviewCompleted = true; $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); break; case "Circle": - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $rootScope.CircleNumber = $rootScope.ObjectIndex++; // $rootScope.isCirclePreviewCompleted = true; $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); break; case "Arrow": - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $rootScope.ArrowNumber = $rootScope.ObjectIndex++; //$rootScope.isArrowPreviewCompleted = true; $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); break; case "Pin": - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $rootScope.PinNumber = $rootScope.PinObjectIndex++; $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; @@ -1321,7 +1358,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); break; case "TextArea": - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; $rootScope.IsTextAlreadySave = false; $("#text_area").val(''); // Draw text @@ -1468,12 +1505,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, resizeFromCenter: false, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.shapeTypeText = "textAreaRect"; - var layerNameSplit = layer.name; - var splitedName = layerNameSplit.split("_"); + var layerName = layer.name; + var splitedName = layerName.split("_"); var textValName = "TextAreaNew_"; var concatinateResult = textValName.concat(splitedName[1]); $rootScope.canvasLayerNameCollection = []; @@ -1490,11 +1528,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, dblclick: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.isTextAreaClosedButtonActive = false; $rootScope.IsTextAlreadySave = true; @@ -1629,12 +1669,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", // $("#selected-font-size").val(CurrentFontSize); } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $('#canvas').setLayer(layer.name, { @@ -1649,11 +1691,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $('#canvas').setLayer(layer.name, { handle: { @@ -1667,6 +1711,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } } @@ -1757,11 +1802,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, resizeFromCenter: false, click: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.shapeTypeText = "textAreaRect"; - var layerNameSplit = layer.name; - var splitedName = layerNameSplit.split("_"); + var layerName = layer.name; + var splitedName = layerName.split("_"); var textValName = "TextAreaAfterEdit_"; var concatinateResult = textValName.concat(splitedName[1]); $rootScope.canvasLayerNameCollection = []; @@ -1779,13 +1825,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, dblclick: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.isTextAreaClosedButtonActive = false; $rootScope.IsTextAlreadySave = true; @@ -1874,11 +1922,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $("#annotationTextModal").modal("toggle"); } else { + //jcanvas property layer.draggable = false; } }, mouseout: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $rootScope.canvasLayerNameCollection = []; $('#canvas').setLayer(layer.name, { @@ -1893,11 +1943,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", }).drawLayers(); } else { + //jcanvas property layer.draggable = false; } }, mouseover: function (layer) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + //jcanvas property layer.draggable = true; $('#canvas').setLayer(layer.name, { handle: { @@ -1913,6 +1965,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } else { + //jcanvas property layer.draggable = false; } } @@ -1923,7 +1976,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } //---- - $rootScope.BindCanvasDrawingListners = function (event) { + $rootScope.onDrawingCanvasClick = function (event) { $rootScope.clicked = true; // OnPaintCanvasMouseDown(event); @@ -1936,9 +1989,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", // alert("doclick"); // annotation history if (event != undefined) { - if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { - $rootScope.DrawingListners_Canvas(event); + $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(event); } } @@ -2322,7 +2375,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", //if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { // alert($rootScope.isAnnotaionToolBarDrawingModeActive); - // $rootScope.DrawingListners_Canvas(e); + // $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(e); //} //else { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index e120ad1..799be52 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -328,7 +328,7 @@
- +