diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 18427f7..f025048 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -34,6 +34,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.bagartDetails;
$scope.transNumber = 50;
+ $rootScope.modestyCanvasZindex = 12100;
+ $rootScope.isModestyCanvasVisible = false;
//for transarency scale
$scope.TBDrawStartX;
$scope.TBDrawStartY;
@@ -731,7 +733,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//set max for LayerNumber input
$rootScope.totalLayers = dataLength - 1;
- // debugger
+
$('#txtLayerNumber').attr('max', $rootScope.totalLayers);
$('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers);
@@ -1548,7 +1550,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top);
$scope.MultiLanguageAnnationArray = [];
$scope.MultiLanguageAnnationArray.push(annotationText);
-
+
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
}
else {
@@ -1574,7 +1576,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.MultiLanguageAnnationArray = [];
$scope.MultiLanguageAnnationArray.push(annotationText);
-
+
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
}
@@ -2785,7 +2787,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
return null;
}
}
-
+
//layer change function
$scope.LayerChange = function () {
@@ -2795,7 +2797,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// $rootScope.isListManagerSelected = false;
$rootScope.CloseListManager();
-
$scope.isLayerChange = true;
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -2937,17 +2938,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('#sppeachBubble').remove();
$(".com").remove();
$("#bord").remove();
-
-
- if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")){
+
+ if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")) {
if ($rootScope.isAnnotatiomToolBarPopupActive == false) {
-
- if ($("#transparencyScale").css("display") == "block") {
+ if ($("#transparencyScale").css("display") == "block") {
$rootScope.switchToTransparencycanvas();
}
}
else {
-
if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
$rootScope.switchToTransparencycanvas();
}
@@ -2956,14 +2954,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.switchCanvas();
}
}
-
}
else
{
if ($rootScope.isAnnotatiomToolBarPopupActive == true) {
-
$rootScope.CloseAnnotationTool();
-
}
}
}
@@ -2973,15 +2968,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.DisableProgressBar = function () {
- // alert('Disabled wait cursor is called');
-
if ($rootScope.isHighLight) {
- //alert('isHighlight: ' + $scope.isHighLight);
-
- //$('#btnHighLight').removeClass('btn btn-black');
- //$('#btnHighLight').addClass('btn-primary');
-
+
$("#btnHighLight").addClass("btn-primary");
$("#btnHighLight").removeClass("btn-black");
@@ -3043,7 +3032,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) {
- //debugger;
+
if (isAnnotationForTBox == true) {
//1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that
// we decide the size of speech bubble
@@ -3281,7 +3270,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length;
// alert(Exists_annotation);
// alert(pointClicked_annotation);
- var sppechBubbleHTML_annotation = "
'
+ + '
'
+ '
';
@@ -3962,6 +3951,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
function mouseDownListener(e) {
+
//Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
var tCanvas = document.getElementById('transparencyCanvas');
if ($('#transparencyScale').css("visibility") == 'visible') {
@@ -4237,18 +4227,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#annotationpainteraser").removeClass("activebtncolor");
if ($("#DrawMode").hasClass("annotationtoolbartab"))
{
- var drawCanvasZindex = $("#canvas").css("z-index");
- var paintCanvasZindex = $("#canvasPaint").css("z-index");
- drawCanvasZindex = parseInt(drawCanvasZindex) - 1;
- paintCanvasZindex = parseInt(paintCanvasZindex) - 1;
- if (drawCanvasZindex > paintCanvasZindex) {
- $(".ui-wrapper").css("z-index", drawCanvasZindex);
- $rootScope.UIWrapperZIndex = drawCanvasZindex;
+ if ($rootScope.isModestyCanvasVisible == true) {
+
+ $rootScope.switchCanvas();
+
}
else {
- $(".ui-wrapper").css("z-index", paintCanvasZindex);
- $rootScope.UIWrapperZIndex = paintCanvasZindex;
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ drawCanvasZindex = parseInt(drawCanvasZindex) - 1;
+ paintCanvasZindex = parseInt(paintCanvasZindex) - 1;
+ if (drawCanvasZindex > paintCanvasZindex) {
+ $(".ui-wrapper").css("z-index", drawCanvasZindex);
+ $rootScope.UIWrapperZIndex = drawCanvasZindex;
+ }
+ else {
+ $(".ui-wrapper").css("z-index", paintCanvasZindex);
+ $rootScope.UIWrapperZIndex = paintCanvasZindex;
+ }
}
+
}
else {
$rootScope.switchToTransparencycanvas();
@@ -4458,6 +4456,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) {
+ $rootScope.isModestyCanvasVisible = true;
var canvasModesty = document.createElement('canvas');
canvasModesty.id = modestyTransCanvasId;
canvasModesty.height = Height;
@@ -4466,7 +4465,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
canvasModesty.style.left = X + 'px';
canvasModesty.style.top = Y + 'px';
canvasModesty.style.visibility = 'visible';
- canvasModesty.style.zIndex = '2000';
+ canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
document.getElementById('canvasDiv').appendChild(canvasModesty);
@@ -5389,8 +5388,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.annotationTextArrayT2 = [];
$scope.annotationTextArrayT1.push(annotations.annotationT1);
$scope.annotationTextArrayT2.push(annotations.annotationT2);
-
-
+
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
}
else
@@ -5402,7 +5400,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.annotationTextArrayT1.push(annotations.annotationT1);
$scope.annotationTextArrayT2.push(annotations.annotationT2);
-
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
}
@@ -5487,8 +5484,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($('#speechBubbleTrns').length > 0) {
$('#speechBubbleTrns').remove();
}
+
+ var t = $(".ui-wrapper").css("top");
+ var e = t.split("p");
+ var a = $(".ui-wrapper").css("height");
+ var b = a.split("p");
+ var c = parseInt(e[0]) + parseInt(b[0]);
+
+
+ var tCanvasTopPos = $(".ui-wrapper").css("top");
+ var tCanvasTopPosAftrSplit = tCanvasTopPos.split("p");
+ var tCanvasHeight = $(".ui-wrapper").css("height");
+ var tCanvasHeightAftrSplit = tCanvasHeight.split("p");
+ var tCanvasAttr = parseInt(tCanvasTopPosAftrSplit[0]) + parseInt(tCanvasHeightAftrSplit[0]);
+
+
+ if ((evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top) >= parseInt(tCanvasTopPosAftrSplit[0]) && (evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top) < tCanvasAttr) {
+
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
+ }
+ else {
+
+ $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(event);
+
+ }
+
}
@@ -5533,7 +5554,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.annotationTextArrayT2 = [];
$scope.annotationTextArrayT1.push(annotations.annotationT1);
$scope.annotationTextArrayT2.push(annotations.annotationT2);
-
+
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
}
else
@@ -5542,7 +5563,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.annotationTextArrayT2 = [];
$scope.annotationTextArrayT1.push(annotations.annotationT1);
$scope.annotationTextArrayT2.push(annotations.annotationT2);
-
+
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
}
}
@@ -5641,8 +5662,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.onTransparencyChange = function (ev, ui) {
- //debugger;
- // alert('t change')
+
$scope.transNumber = ui.value;
var tCanvas = document.getElementById('transparencyCanvas');
@@ -5700,7 +5720,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.CloseTransparencyBox = function () {
-
+ $rootScope.isModestyCanvasVisible = false;
//for enabling annoataions.
//Now everything si done on canavases uswed in annotation toolbar.
@@ -8418,8 +8438,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
.from($scope.VocabTermTxt)
.where('_TermText == ' + $scope.searchFilter)
.select('_ActualTermNumber', '_TermText', '_cdId');
-
+
if (EnteredDASearchTerm.length > 0) {
+
$scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber);
$scope.IsSearchVisible = false;
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 9b034e3..adcec64 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -465,7 +465,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.openParent = function (slug) {
- // debugger;
+
var openViews = $rootScope.openViews;
if (openViews.length > 0) {
$rootScope.openViews.splice(openViews.length - 1);
@@ -640,21 +640,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.CIAnotationIdentifyModeOff = false;
$rootScope.OnIdentifyClick = function () {
-
+
$("#OnIdentify").addClass("annotationtoolbartab");
$("#DrawMode").removeClass("annotationtoolbartab");
- // $rootScope.isIdetifyClicked = true;
- // $rootScope.isDrawingToolSelected = false;
- // debugger;
+
if ($rootScope.CIAnotationIdentifyModeOff == true) {
$('.btnCursor').removeClass('activebtncolor');
} else {
- // $("#canvasPaint").css("display", "none");
- // $("#canvas").css("display", "none");
-
- // $("#canvasPaint").css("z-index", "0");
- // $("#canvas").css("z-index", "0");
+
$('.btnCursor').removeClass('activebtncolor');
}
@@ -673,26 +667,86 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
$rootScope.switchToTransparencycanvas = function () {
+
+ if ($rootScope.isModestyCanvasVisible == true) {
+ var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
+ if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
+ for (var j = 0; j < modestyTransCanvases.length; j++) {
+ var ctx = document.getElementById(modestyTransCanvases[j].id);
+
+ if (ctx.style.visibility == "visible") {
- var x = $("#canvas").css("z-index");
- var y = $("#canvasPaint").css("z-index");
- x = parseInt(x) + 1;
- y = parseInt(y) + 1;
- if (x > y) {
- $(".ui-wrapper").css("z-index", x);
- $("#canvas").css("z-index", x);
- $rootScope.UIWrapperZIndex = x;
+ if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ var TransCanvasZindex = ctx.style.zIndex;
+ var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
+ MaxZindexVal = MaxZindexVal + 1;
+ $("#canvas").css("z-index", MaxZindexVal);
+ $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
+
+ }
+ else {
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ var TransCanvasZindex = ctx.style.zIndex;
+ var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
+ MaxZindexVal = parseInt(MaxZindexVal + 1);
+
+ if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
+
+ $("#canvasPaint").css("z-index", MaxZindexVal);
+ }
+ else {
+ $("#canvas").css("z-index", MaxZindexVal);
+ }
+
+ }
+ }
+ else
+ {
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
+ paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
+ if (drawCanvasZindex > paintCanvasZindex) {
+ $(".ui-wrapper").css("z-index", drawCanvasZindex);
+ $("#canvas").css("z-index", drawCanvasZindex);
+ $rootScope.UIWrapperZIndex = drawCanvasZindex;
+ }
+ else {
+ $(".ui-wrapper").css("z-index", paintCanvasZindex);
+ $("#canvas").css("z-index", paintCanvasZindex);
+ $rootScope.UIWrapperZIndex = paintCanvasZindex;
+ }
+
+ }
+ }
+ }
+
+ }
+ else
+ {
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ drawCanvasZindex = parseInt(drawCanvasZindex) + 1;
+ paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
+ if (drawCanvasZindex > paintCanvasZindex) {
+ $(".ui-wrapper").css("z-index", drawCanvasZindex);
+ $("#canvas").css("z-index", drawCanvasZindex);
+ $rootScope.UIWrapperZIndex = drawCanvasZindex;
}
else {
- $(".ui-wrapper").css("z-index", y);
- $("#canvas").css("z-index", y);
- $rootScope.UIWrapperZIndex = y;
+ $(".ui-wrapper").css("z-index", paintCanvasZindex);
+ $("#canvas").css("z-index", paintCanvasZindex);
+ $rootScope.UIWrapperZIndex = paintCanvasZindex;
}
-
+ }
}
$rootScope.DrawingMode = function () {
+
//Annotation History
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
$("#OnIdentify").removeClass("annotationtoolbartab");
@@ -726,14 +780,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
- $rootScope.switchCanvas();
- $rootScope.shapeType = "Line";
-
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-line").addClass("activebtncolor");
$("#OnIdentify").removeClass('annotationtoolbartab');
$("#DrawMode").addClass('annotationtoolbartab');
+
+
+ $rootScope.switchCanvas();
+ $rootScope.shapeType = "Line";
+
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
}
@@ -742,16 +799,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
- $rootScope.switchCanvas();
- $rootScope.switchCanvas();
- $rootScope.setListManagerZindex = true;
- $rootScope.shapeType = "Pin";
-
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-pin").addClass("activebtncolor");
$("#OnIdentify").removeClass('annotationtoolbartab');
$("#DrawMode").addClass('annotationtoolbartab');
+
+ $rootScope.switchCanvas();
+ $rootScope.setListManagerZindex = true;
+ $rootScope.shapeType = "Pin";
+
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
}
@@ -772,17 +830,25 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.setListManagerZindex = true;
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
- $rootScope.switchCanvas();
- $rootScope.shapeType = "Rectangle";
+
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-rectangle").addClass("activebtncolor");
$("#OnIdentify").removeClass('annotationtoolbartab');
$("#DrawMode").addClass('annotationtoolbartab');
+
+ $rootScope.switchCanvas();
+ $rootScope.shapeType = "Rectangle";
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
}
$rootScope.paintBrush = function () {
+ $('.btnCursor').removeClass('activebtncolor');
+ $(".btn-annotation").removeClass("activebtncolor");
+ $(".btn-annotation-brush").addClass("activebtncolor");
+ $("#OnIdentify").removeClass('annotationtoolbartab');
+ $("#DrawMode").addClass('annotationtoolbartab');
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
if ($rootScope.disableAnnotationtoolOnListManager == true) {
$rootScope.switchCanvas();
@@ -801,7 +867,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
} else {
- // $('.btnCursor').addClass('activebtncolor');
$rootScope.setListManagerZindex = true;
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
@@ -821,8 +886,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleColorWithOpacity);
-
-
if ($rootScope.shapeSize == '') {
$('#canvasPaint').sketch({ defaultSize: 1 });
}
@@ -830,17 +893,58 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$('#canvasPaint').sketch();
}
-
}
-
- $('.btnCursor').removeClass('activebtncolor');
- $(".btn-annotation").removeClass("activebtncolor");
- $(".btn-annotation-brush").addClass("activebtncolor");
- $("#OnIdentify").removeClass('annotationtoolbartab');
- $("#DrawMode").addClass('annotationtoolbartab');
}
$rootScope.switchCanvasToPaintCanvas = function (e) {
+ if ($rootScope.isModestyCanvasVisible == true) {
+ var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
+ if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
+ for (var j = 0; j < modestyTransCanvases.length; j++) {
+ var ctx = document.getElementById(modestyTransCanvases[j].id);
+ if (ctx.style.visibility == "visible") {
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ var TransCanvasZindex = ctx.style.zIndex;
+ var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
+ MaxZindexVal = MaxZindexVal + 1;
+ if (($("#canvasPaint").css("display") == "block") && ($("#canvas").css("display") == "block")) {
+ if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
+ $("#canvas").css("z-index", MaxZindexVal);
+ $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
+ }
+ else {
+
+ if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
+ $("#canvasPaint").css("z-index", MaxZindexVal);
+ }
+ else {
+ $("#canvas").css("z-index", MaxZindexVal);
+ }
+ }
+ }
+ }
+ else {
+
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex);
+ MaxZindexVal = parseInt(MaxZindexVal + 1);
+
+ if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
+ $("#canvasPaint").css("z-index", MaxZindexVal);
+ }
+
+ else {
+ $("#canvas").css("z-index", MaxZindexVal);
+ }
+
+ }
+ }
+ }
+
+ }
+ else {
var canvasPaint_zIndex = $('#canvasPaint').css("z-index");
var canvas_zIndex = $('#canvas').css("z-index");
if (canvas_zIndex > canvasPaint_zIndex) {
@@ -852,18 +956,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
$('#canvasPaint').css("z-index", canvasPaint_zIndex);
}
+ }
$rootScope.DrawCircle = function (e) {
$rootScope.setListManagerZindex = true;
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
- $rootScope.switchCanvas();
- $rootScope.shapeType = "Circle";
+
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-circle").addClass("activebtncolor");
$("#OnIdentify").removeClass('annotationtoolbartab');
$("#DrawMode").addClass('annotationtoolbartab');
+
+ $rootScope.switchCanvas();
+ $rootScope.shapeType = "Circle";
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
}
@@ -871,13 +979,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.setListManagerZindex = true;
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
- $rootScope.switchCanvas();
- $rootScope.shapeType = "Arrow";
+
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-arrow").addClass("activebtncolor");
$("#OnIdentify").removeClass('annotationtoolbartab');
$("#DrawMode").addClass('annotationtoolbartab');
+
+ $rootScope.switchCanvas();
+ $rootScope.shapeType = "Arrow";
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
}
$rootScope.DrawText = function () {
@@ -885,14 +996,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.setListManagerZindex = true;
$("#canvasPaint").css("display", "block");
$("#canvas").css("display", "block");
- $rootScope.switchCanvas();
- $rootScope.shapeType = "TextArea";
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-Text").addClass("activebtncolor");
$("#OnIdentify").removeClass('annotationtoolbartab');
$("#DrawMode").addClass('annotationtoolbartab');
+
+ $rootScope.switchCanvas();
+
+ $rootScope.shapeType = "TextArea";
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
}
@@ -908,15 +1022,75 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.switchCanvas = function () {
- var x = $('#canvasPaint').css("z-index");
+
+ if ($rootScope.isModestyCanvasVisible == true) {
+ var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
+ if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
+ for (var j = 0; j < modestyTransCanvases.length; j++) {
+ var ctx = document.getElementById(modestyTransCanvases[j].id);
- var y = $('#canvas').css("z-index");
- if (x > y) {
- y = parseInt(x) + 1;
- } else {
- y = parseInt(y) + 1;
+ if (ctx.style.visibility == "visible") {
+
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+ var TransCanvasZindex = ctx.style.zIndex;
+ var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
+ MaxZindexVal = MaxZindexVal + 1;
+
+
+ if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
+
+ $("#canvas").css("z-index", MaxZindexVal);
+ $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
+
+ }
+ else {
+
+ if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
+
+ $("#canvasPaint").css("z-index", MaxZindexVal);
+ }
+ else {
+ $("#canvas").css("z-index", MaxZindexVal);
+ }
+
+ }
+ }
+ else {
+
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+
+ var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex);
+ MaxZindexVal = parseInt(MaxZindexVal + 1);
+
+ if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
+
+ $("#canvasPaint").css("z-index", MaxZindexVal);
+ }
+
+ else {
+ $("#canvas").css("z-index", MaxZindexVal);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+
+ var drawCanvasZindex = $("#canvas").css("z-index");
+ var paintCanvasZindex = $("#canvasPaint").css("z-index");
+
+
+ if (drawCanvasZindex > paintCanvasZindex) {
+ paintCanvasZindex = parseInt(drawCanvasZindex) + 1;
+ } else {
+ paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
+ }
+ $('#canvas').css("z-index", paintCanvasZindex);
}
- $('#canvas').css("z-index", y);
+
}
$rootScope.EraseDrawing = function () {
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
@@ -1078,9 +1252,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#edit-slider-4").css({ "pointer-events": "none" });
$("#editstylebackgroundcolor").css({ "pointer-events": "none" });
}
- //$("#borderWidthCanvasElement").change(function () {
- // $(".marginTopBtm10 div.outlinediv").css("border-color", x);
- //});
+
} else {
document.getElementById('fill-option').checked = isfilloptionChecked;
@@ -1963,35 +2135,35 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
case "Line":
$(".line").remove();
$rootScope.isLinePreviewCompleted = true;
- $("#canvasDiv").append("
");
+ $("#canvasDiv").append("
");
$rootScope.Annotationangle();
break;
case "Arrow":
$(".arrow").remove();
$rootScope.isArrowPreviewCompleted = true;
- $("#canvasDiv").append("
");
+ $("#canvasDiv").append("
");
$rootScope.Annotationangle();
break;
case "Pin":
$(".pin").remove();
$rootScope.isPinPreviewCompleted = true;
- $("#canvasDiv").append("
");
+ $("#canvasDiv").append("
");
$rootScope.Annotationangle();
break;
case "Circle":
$(".circle").remove();
$rootScope.isCirclePreviewCompleted = true;
- $("#canvasDiv").append("
");
+ $("#canvasDiv").append("
");
break;
case "Rectangle":
$(".rectangle").remove();
$rootScope.isRectanglePreviewCompleted = true;
- $("#canvasDiv").append("
");
+ $("#canvasDiv").append("
");
break;
case "TextArea":
$(".textarea").remove();
$rootScope.isTextAreaPreviewCompleted = true;
- $("#canvasDiv").append("
");
+ $("#canvasDiv").append("
");
break;
}