Commit b1701fb22d333ce4982ef238c0ebf01946b7ab3d
1 parent
b14b6ff3
fixed the logged issue but now single annottaion in transparrnecy box in a case
Showing
2 changed files
with
52 additions
and
17 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -35,7 +35,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
35 | 35 | $scope.transNumber = 100; |
36 | 36 | |
37 | 37 | $rootScope.modestyCanvasZindex = 12100; |
38 | - $rootScope.isModestyCanvasVisible = false; | |
38 | + $rootScope.isTBoxModestyVisible = false; | |
39 | 39 | //for transarency scale |
40 | 40 | $scope.TBDrawStartX; |
41 | 41 | $scope.TBDrawStartY; |
... | ... | @@ -3234,7 +3234,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3234 | 3234 | if (parseInt(termNumber) != parseInt(figLeafTermNo)) { |
3235 | 3235 | $scope.TermNumber = termNumber; |
3236 | 3236 | for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) { |
3237 | - if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) { | |
3237 | + if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) | |
3238 | + { | |
3238 | 3239 | $scope.matchedTermNoData = new jinqJs() |
3239 | 3240 | .from($rootScope.TermNumberData.TermData.Term) |
3240 | 3241 | .where('_TermNumber == ' + termNumber) |
... | ... | @@ -3260,6 +3261,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3260 | 3261 | // send term no to vocab json data to get the text |
3261 | 3262 | } |
3262 | 3263 | } |
3264 | + else { | |
3265 | + var currentBodyViewId = $rootScope.voId; | |
3266 | + var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json'; | |
3267 | + DataService.getAnotherJson(termJsonPath) | |
3268 | + .then( | |
3269 | + function (result) { | |
3270 | + $rootScope.TermNumberData = result; | |
3271 | + $scope.GetAnnotationText(termNumber); | |
3272 | + }) | |
3273 | + } | |
3263 | 3274 | } |
3264 | 3275 | } |
3265 | 3276 | |
... | ... | @@ -4607,7 +4618,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4607 | 4618 | $("#annotationpaintbrushsize").removeClass("activebtncolor"); |
4608 | 4619 | $("#annotationpainteraser").removeClass("activebtncolor"); |
4609 | 4620 | if ($("#DrawMode").hasClass("annotationtoolbartab")) { |
4610 | - if ($rootScope.isModestyCanvasVisible == true) { | |
4621 | + if ($rootScope.isTBoxModestyVisible == true) { | |
4611 | 4622 | |
4612 | 4623 | $rootScope.switchCanvas(); |
4613 | 4624 | |
... | ... | @@ -4842,7 +4853,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4842 | 4853 | } |
4843 | 4854 | |
4844 | 4855 | if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) { |
4845 | - $rootScope.isModestyCanvasVisible = true; | |
4856 | + $rootScope.isTBoxModestyVisible = true; | |
4846 | 4857 | var canvasModesty = document.createElement('canvas'); |
4847 | 4858 | canvasModesty.id = modestyTransCanvasId; |
4848 | 4859 | canvasModesty.height = Height; |
... | ... | @@ -4851,7 +4862,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4851 | 4862 | canvasModesty.style.left = X + 'px'; |
4852 | 4863 | canvasModesty.style.top = Y + 'px'; |
4853 | 4864 | canvasModesty.style.visibility = 'visible'; |
4854 | - canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex; | |
4865 | + if($rootScope.currentBodyViewId=="11"){ | |
4866 | + | |
4867 | + canvasModesty.style.zIndex = 11000; | |
4868 | + } | |
4869 | + else | |
4870 | + canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex; | |
4855 | 4871 | canvasModesty.addEventListener('click', OnClickModestyTransCanvas); |
4856 | 4872 | |
4857 | 4873 | document.getElementById('canvasDiv').appendChild(canvasModesty); |
... | ... | @@ -5482,11 +5498,23 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5482 | 5498 | var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); |
5483 | 5499 | var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); |
5484 | 5500 | if ($rootScope.Xaxis <= bodyRegionRight && $rootScope.Yaxis <= bodyRegionBottom && value.X <= $rootScope.Xaxis && value.Y <= $rootScope.Yaxis) { |
5485 | - $rootScope.BRId = value.bodyRegionId; | |
5486 | - $rootScope.BodyRegionXAxis = value.X; | |
5487 | - $rootScope.BodyRegionYAxis = value.Y; | |
5488 | - $rootScope.isMirrorBodyRegion = value.IsMirror; | |
5489 | - return false; | |
5501 | + if ($rootScope.currentBodyViewId == "11" || $rootScope.currentBodyViewId == "9") { | |
5502 | + if (value.bodyRegionId == "6") { | |
5503 | + $rootScope.BRId = value.bodyRegionId; | |
5504 | + $rootScope.BodyRegionXAxis = value.X; | |
5505 | + $rootScope.BodyRegionYAxis = value.Y; | |
5506 | + $rootScope.isMirrorBodyRegion = value.IsMirror; | |
5507 | + return false; | |
5508 | + } | |
5509 | + } | |
5510 | + else { | |
5511 | + $rootScope.BRId = value.bodyRegionId; | |
5512 | + $rootScope.BodyRegionXAxis = value.X; | |
5513 | + $rootScope.BodyRegionYAxis = value.Y; | |
5514 | + $rootScope.isMirrorBodyRegion = value.IsMirror; | |
5515 | + return false; | |
5516 | + } | |
5517 | + | |
5490 | 5518 | } |
5491 | 5519 | }); |
5492 | 5520 | } |
... | ... | @@ -6258,7 +6286,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6258 | 6286 | } |
6259 | 6287 | |
6260 | 6288 | $scope.CloseTransparencyBox = function () { |
6261 | - $rootScope.isModestyCanvasVisible = false; | |
6289 | + $rootScope.isTBoxModestyVisible = false; | |
6262 | 6290 | //for enabling annoataions. |
6263 | 6291 | //Now everything si done on canavases uswed in annotation toolbar. |
6264 | 6292 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -966,7 +966,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
966 | 966 | |
967 | 967 | $rootScope.switchToTransparencycanvas = function () { |
968 | 968 | |
969 | - if ($rootScope.isModestyCanvasVisible == true) { | |
969 | + if ($rootScope.isTBoxModestyVisible == true) { | |
970 | 970 | var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']"); |
971 | 971 | if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { |
972 | 972 | for (var j = 0; j < modestyTransCanvases.length; j++) { |
... | ... | @@ -975,14 +975,21 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
975 | 975 | if (ctx.style.visibility == "visible") { |
976 | 976 | |
977 | 977 | if ($("#OnIdentify").hasClass("annotationtoolbartab")) { |
978 | - | |
978 | + | |
979 | 979 | var drawCanvasZindex = $("#canvas").css("z-index"); |
980 | 980 | var paintCanvasZindex = $("#canvasPaint").css("z-index"); |
981 | 981 | var TransCanvasZindex = ctx.style.zIndex; |
982 | 982 | var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex); |
983 | 983 | MaxZindexVal = MaxZindexVal + 1; |
984 | 984 | $("#canvas").css("z-index", MaxZindexVal); |
985 | - $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal); | |
985 | + if ($rootScope.currentBodyViewId == "11") { | |
986 | + $(".ui-wrapper").css("z-index", MaxZindexVal + 1); | |
987 | + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal); | |
988 | + | |
989 | + } | |
990 | + else | |
991 | + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal); | |
992 | + | |
986 | 993 | |
987 | 994 | } |
988 | 995 | else { |
... | ... | @@ -1265,7 +1272,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1265 | 1272 | } |
1266 | 1273 | |
1267 | 1274 | $rootScope.switchCanvasToPaintCanvas = function (e) { |
1268 | - if ($rootScope.isModestyCanvasVisible == true) { | |
1275 | + if ($rootScope.isTBoxModestyVisible == true) { | |
1269 | 1276 | var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']"); |
1270 | 1277 | if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { |
1271 | 1278 | for (var j = 0; j < modestyTransCanvases.length; j++) { |
... | ... | @@ -1410,8 +1417,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1410 | 1417 | |
1411 | 1418 | |
1412 | 1419 | $rootScope.switchCanvas = function () { |
1413 | - | |
1414 | - if ($rootScope.isModestyCanvasVisible == true) { | |
1420 | + debugger; | |
1421 | + if ($rootScope.isTBoxModestyVisible == true) { | |
1415 | 1422 | var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']"); |
1416 | 1423 | if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) { |
1417 | 1424 | for (var j = 0; j < modestyTransCanvases.length; j++) { | ... | ... |