diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index e3e317c..17df8e9 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1,10 +1,10 @@
'use strict';
-AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService","TermService","AIAConstants",
+AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "TermService", "AIAConstants",
function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService, AIAConstants) {
-
+
$scope.genderId = "";
$scope.BodyViewData;
$scope.selectedGenderBodyViewData;
@@ -112,8 +112,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.IsSearchVisible = false;
$scope.shapesize = 1;
-
- $scope.CurrentStructure = "active";
+
+ $scope.CurrentStructure = "active";
//array for bodyviewid correspoing to male female(used for gender change)
$scope.correspondingBodyViewIds = {
'1': '5',
@@ -146,7 +146,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//currentTitleFromJson shows the current BodyView Title
$scope.currentTitleFromJson;
$scope.showTabButton = false;
-
+
$scope.IsVisible = function () {
$scope.scroll();
@@ -286,13 +286,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
for (var i = 0; i < daImagePanelConetent.length; i++) {
daImagePanelConetent[i].style.pointerEvents = "none";
daImagePanelConetent[i].style.opacity = "0.5";
-
+
}
//to disbale layer change slider
$('.ui-slider').slider('disable');
- // document.getElementById('txtlayerNumber').style.pointerEvents = "none";
+ // document.getElementById('txtlayerNumber').style.pointerEvents = "none";
$("#txtlayerNumber").prop('disabled', true);
-
+
$scope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -307,7 +307,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
//to enable layer change slider
$('.ui-slider').slider('enable');
- // document.getElementById('txtlayerNumber').style.pointerEvents = "auto";
+ // document.getElementById('txtlayerNumber').style.pointerEvents = "auto";
$("#txtlayerNumber").prop('disabled', false);
$scope.isLoading = false;
@@ -315,7 +315,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.openView = function ($event) {
-
+
$rootScope.disableAnnotationTB = false;
$rootScope.MenuModuleName = "DA";
$rootScope.isLoading = true;
@@ -331,7 +331,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var u = $location.url();
$location.url('/da-body-view');
-
+
var view_list = angular.element($event.currentTarget);
var view_list_male_female = view_list.attr('title');
@@ -406,10 +406,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.male = "";
$rootScope.female = "active";
}
-
-
-
+
+
+
}
@@ -584,26 +584,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//0.3
var daBodyviewElement = angular.element(document.getElementById("daBodyview"));
- $timeout(function ()
- {
+ $timeout(function () {
$compile(daBodyviewElement.contents())($scope);
console.log('html is compiled ' + document.getElementById('daView'))
if (document.getElementById('daView') != null) {
- $scope.loadDAView(currentBodyViewId);
+ $scope.loadDAView(currentBodyViewId);
}
- else
- {
+ else {
// this is a work around solution for a bug where DA does not load for long and user need to close the DA partially opened
// view, now we are programmatically closing the hung view and when user will reopen the DA view from tile then it will
// open without any issue.
$("#daImagePanel .jsglyph-remove").click();
-
+
console.log('html is compiled in else ' + document.getElementById('daView'))
-
+
}
-
+
if ($('#daImagePanel').offset().top == 0)
$('#daImagePanel').css("top", '70px');
@@ -620,14 +618,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$location.path('/');
-
+
}
}
// we are loading most of alll data used in DA by this function so that at the time of any functionality delay in data laod will not happened.
- $scope.loadDAView = function (currentBodyViewId)
- {
+ $scope.loadDAView = function (currentBodyViewId) {
//0.4 added some stylesheets
$('#daBodyview').css("height", (parseInt($(window).outerHeight()) - 62 - 20));
@@ -638,7 +635,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
console.log('before LoadBodyViewNavigatorImage call')
$scope.LoadBodyViewNavigatorImage();
-
+
$scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
$scope.layerNumber = 0;
@@ -655,106 +652,105 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
-
+
angular.element(document).ready(function (e) {
- var $ua = navigator.userAgent;
- // var $event = ($ua.match(/(iPod|iPhone|iPad|android)/i));
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- $("#layerChangeSlider").css("pointer-events", "auto");
- }
+ var $ua = navigator.userAgent;
+ // var $event = ($ua.match(/(iPod|iPhone|iPad|android)/i));
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+ $("#layerChangeSlider").css("pointer-events", "auto");
+ }
- //to get slider working on ipad
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- var jspanelContainerWidth = $(".jsPanel-content").css("width");
- $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
- $("#daImagePanel").css("width", "100%");
- $("#layerChangeSlider").css("pointer-events", "auto");
- // on identity mode click
- $("#btnZoom").removeAttr("onclick");
- $("#btnZoom").on("touchstart", function () {
- if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
- $(".btn-annotation").removeClass("activebtncolor");
- //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in.
- $(".com").remove();
- $("#bord").remove();
- console.log('OnZoom is called outside ');
- var scope = angular.element(document.getElementById("daView")).scope();
- scope.$apply(function () {
- scope.enableZoom();
+ //to get slider working on ipad
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+ var jspanelContainerWidth = $(".jsPanel-content").css("width");
+ $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
+ $("#daImagePanel").css("width", "100%");
+ $("#layerChangeSlider").css("pointer-events", "auto");
+ // on identity mode click
+ $("#btnZoom").removeAttr("onclick");
+ $("#btnZoom").on("touchstart", function () {
+ if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
+ $(".btn-annotation").removeClass("activebtncolor");
+ //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in.
+ $(".com").remove();
+ $("#bord").remove();
+ console.log('OnZoom is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableZoom();
+ });
});
- });
- // on transparency mode click
- $("#btnTranparency").removeAttr("onclick");
- $("#btnTranparency").on("touchstart", function () {
- console.log('OnEnableExtract is called outside ');
- var scope = angular.element(document.getElementById("daView")).scope();
- scope.$apply(function () {
- scope.createTransparencyBox('true');
+ // on transparency mode click
+ $("#btnTranparency").removeAttr("onclick");
+ $("#btnTranparency").on("touchstart", function () {
+ console.log('OnEnableExtract is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.createTransparencyBox('true');
+ });
});
- });
- // on normal mode click
- $("#btnNormalMode").removeAttr("onclick");
- $("#btnNormalMode").on("touchstart", function () {
- console.log('OnEnableNormalMode is called outside ');
- $("#btnTranparency").removeClass("disabled");
- var scope = angular.element(document.getElementById("daView")).scope();
- scope.$apply(function () {
- scope.enableNormalMode();
+ // on normal mode click
+ $("#btnNormalMode").removeAttr("onclick");
+ $("#btnNormalMode").on("touchstart", function () {
+ console.log('OnEnableNormalMode is called outside ');
+ $("#btnTranparency").removeClass("disabled");
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableNormalMode();
+ });
});
- });
- // on extract mode click
- $("#btnExtract").removeAttr("onclick");
- $("#btnExtract").on("touchstart", function () {
- console.log('OnEnableExtract is called outside ');
- var scope = angular.element(document.getElementById("daView")).scope();
- scope.$apply(function () {
- scope.enableExtract('true');
+ // on extract mode click
+ $("#btnExtract").removeAttr("onclick");
+ $("#btnExtract").on("touchstart", function () {
+ console.log('OnEnableExtract is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableExtract('true');
+ });
});
- });
- // on highlight mode click
- $("#btnHighLight").removeAttr("onclick");
- $("#btnHighLight").on("touchstart", function () {
- console.log('OnEnableHighlight is called outside ');
- var scope = angular.element(document.getElementById("daView")).scope();
- scope.$apply(function () {
- scope.enableHighlight();
+ // on highlight mode click
+ $("#btnHighLight").removeAttr("onclick");
+ $("#btnHighLight").on("touchstart", function () {
+ console.log('OnEnableHighlight is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableHighlight();
+ });
});
- });
- // on show/hide mode click
- $("#btnStrutureBox").removeAttr("onclick");
- $("#btnStrutureBox").on("touchstart", function () {
- console.log('OnBodySystem chnaged is called outside ');
- var scope = angular.element(document.getElementById("daView")).scope();
- scope.$apply(function () {
- scope.enableShowHideStructureBox();
+ // on show/hide mode click
+ $("#btnStrutureBox").removeAttr("onclick");
+ $("#btnStrutureBox").on("touchstart", function () {
+ console.log('OnBodySystem chnaged is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableShowHideStructureBox();
+ });
});
- });
- }
+ }
+
+ $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
- $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
-
$rootScope.selectedBodySystemName = 'All';
$rootScope.selectedBodySystemId = 0;
$rootScope.searchSelectedText = '';
});
var sliderVal = document.getElementById('layerChangeSlider');
-
+
console.log('on slider initialize:' + sliderVal);
$("#layerChangeSlider").slider({
orientation: "vertical",
- range: "max",
+ range: "max",
min: 0,
value: 0,
- slide: function (event, ui)
- {
+ slide: function (event, ui) {
var sliderVal = document.getElementById('layerChangeSlider');
console.log('on slider slide :' + sliderVal);
@@ -767,7 +763,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
},
stop: function (event, ui) {
-
+
var la;
var rootScope = angular.element(document.getElementById("bo")).scope();
rootScope.$apply(function () {
@@ -824,20 +820,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var languageArray = [];
$rootScope.vocabTermDataArray = [];
var languageArray = $rootScope.lexiconLanguageArray;
-
+
console.log(languageArray.length);
console.log('loadSearchDataForBodyView');
-
+
var currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId");
-
+
for (var i = 0; i <= languageArray.length - 1; i++) {
var searchWorker = new Worker('search-wp.js');
-
+
//push workers in array to further used the refernece to delete the workers
$scope.runningSearchWorkers.push({ 'workerName': searchWorker })
//console.log('for bodyRegionId = ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"))
-
+
searchWorker.postMessage({
@@ -847,7 +843,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
})
searchWorker.onmessage = function (e) {
-
+
//console.log('callback searchWorker , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"));
$rootScope.TermNumberData = e.data.TermNumberData;
console.log("$rootScope.TermNumberData = " + $rootScope.TermNumberData.length);
@@ -855,10 +851,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.vocabTermTxt = e.data.vocabTermTxt,
$scope.vocabLanguage = e.data.language,
$rootScope.vocabTermDataArray.push({ "language": $scope.vocabLanguage, "VocabTermData": $rootScope.VocabTermData, "vocabTermTxt": $scope.vocabTermTxt });
-
+
for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) {
-
+
$rootScope.vocabTermDataArray[i].vocabTermTxt = new jinqJs()
.from($rootScope.vocabTermDataArray[i].vocabTermTxt)
.distinct('_TermText', '_ActualTermNumber')
@@ -872,7 +868,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($rootScope.vocabTermDataArray.length == $rootScope.lexiconLanguageArray.length) {
$("#setting-spinner").css("display", "none");
-
+
for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
primaryLexiconIndex = i;
@@ -902,12 +898,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
-
+
//console.log("s" + $rootScope.vocabTermDataArray);
//call watch on '$scope.VocabTermTxt and compile
and append to on first time load
//$scope.$watch('$rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt', function (newValue, oldValue, scope) {
-
-
+
+
//}, true);
@@ -942,7 +938,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.totalLayers = dataLength - 1;
$('#txtLayerNumber').attr('max', $rootScope.totalLayers);
-
+
var layerChangeSliderVal = document.getElementById('layerChangeSlider');
console.log('inside bodyViewWorker.onmessage. $rootScope.totalLayers = ' + $rootScope.totalLayers + ' #layerChangeSlider value: ' + layerChangeSliderVal);
@@ -1147,7 +1143,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//remove transparency scale
$('#transparencyScale').css('visibility', 'hidden');
}
-
+
}
if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) {
@@ -1201,7 +1197,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//2.Draw mirror image
$scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
-
+
$rootScope.BodyRegionCordinatesData.push(
{
"bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
@@ -1211,7 +1207,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//3.GetMaskImageSource
var maskImageSrc = $scope.GetMaskImageSource($scope.imageSource);
-
+
//4 Draw Mask Mirror Image
$scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), maskImageSrc, value._BodyRegionId, 'Y');
@@ -1306,34 +1302,33 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ((dtlOfSktn != null || dtlOfSktn != undefined) && (dtlOfSktn.length > 0)) {
-
- $scope.figLaefImageName = dtlOfSktn[0]._ImageId;
+ $scope.figLaefImageName = dtlOfSktn[0]._ImageId;
- $scope.lowerlayerNumberForModesty = dtlOfSktn[0]._lns;
- $scope.HigherlayerNumberForModesty = dtlOfSktn[0]._lne;
- $scope.layerInfoForModesty.push({ "bodyRegionId": value._BodyRegionId, "lowerlayerNumberForModesty": $scope.lowerlayerNumberForModesty, "HigherlayerNumberForModesty": $scope.HigherlayerNumberForModesty })
- var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
+ $scope.lowerlayerNumberForModesty = dtlOfSktn[0]._lns;
+ $scope.HigherlayerNumberForModesty = dtlOfSktn[0]._lne;
+ $scope.layerInfoForModesty.push({ "bodyRegionId": value._BodyRegionId, "lowerlayerNumberForModesty": $scope.lowerlayerNumberForModesty, "HigherlayerNumberForModesty": $scope.HigherlayerNumberForModesty })
+ var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
- var src = "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
- $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N')
- if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($scope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($scope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) {
- $rootScope.isLayerLessSeven = true;
- if (($rootScope.globalSetting.modesty == 'Y')) {
-
- $('.modestyImg').css('visibility', 'visible');
- }
- }
- else
- {
-
- $rootScope.isLayerLessSeven = false;
- $('.modestyImg').css('visibility', 'hidden');
+ var src = "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
+
+ $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N')
+ if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($scope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($scope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) {
+ $rootScope.isLayerLessSeven = true;
+ if (($rootScope.globalSetting.modesty == 'Y')) {
+
+ $('.modestyImg').css('visibility', 'visible');
}
+ }
+ else {
+
+ $rootScope.isLayerLessSeven = false;
+ $('.modestyImg').css('visibility', 'hidden');
+ }
}
}
}
@@ -1351,12 +1346,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//$('#spinner').css('visibility', 'hidden');
}
-
+
//set scrollbars on canvas and hide loading label
-
+
//check the OS
var isiOSSafari = (navigator.userAgent.match(/(iPod|iPhone|iPad|android)/i)) ? true : false;
-
+
//set scrollbars on canvas and hide loading label
$('#daLoaderLabel').css('visibility', 'hidden')
@@ -1374,12 +1369,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
$('#canvasDiv').scrollTop(50)
//var abc = $rootScope.BodyRegionCordinatesData;
-
+
var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber);
console.log('inside CalculateImageCordinates line no 1350. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + '- parseInt($scope.layerNumber)' + parseInt($scope.layerNumber) + 'set value: ' + sliderVal);
- $('#layerChangeSlider').slider("option", "value",sliderVal );
+ $('#layerChangeSlider').slider("option", "value", sliderVal);
// $('#spinner').css('visibility', 'hidden');
@@ -1399,7 +1394,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var dragdivw = 42
$scope.dragdivleft = 21;
- $scope.dragdivtop = 0;
+ $scope.dragdivtop = 0;
}
else {
var dragdivw = 83;
@@ -1410,13 +1405,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$(".dragdivposition").css("left", $scope.dragdivleft);
$(".dragdivposition").css("top", $scope.dragdivtop);
-
+
$('#draggable').css('width', dragdivw);
$('#draggable').css('height', dragdivh)
}
-
+
function scaleRectangle(x, y, height, width, mirrorValue) {
var nzoom = $rootScope.zoomInOut;
@@ -1472,7 +1467,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
-
+
$scope.GetImageSource = function (bodyRegionId) {
@@ -1793,7 +1788,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.MultiLanguageAnnationArray = [];
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
@@ -1813,7 +1808,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// alert(annotationText);
$scope.MultiLanguageAnnationArray = [];
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
@@ -1825,7 +1820,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top);
$scope.MultiLanguageAnnationArray = [];
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
@@ -1880,19 +1875,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var totalCanvas;
if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) {
totalCanvas = 9;
-
+
}
else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) {
totalCanvas = 5;
-
+
}
else if (($rootScope.viewOrientationId == '5')) {
totalCanvas = 4;
-
+
}
else if (($rootScope.viewOrientationId == '6')) {
totalCanvas = 1;
-
+
}
if ($scope.ColoredImageSRC.length < totalCanvas) {
@@ -1907,7 +1902,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
);
}
-
+
var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR');
@@ -1923,7 +1918,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
-
+
if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
@@ -1941,7 +1936,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
else {
$scope.isEligibleForHighlight = false;
}
-
+
if ($scope.isEligibleForHighlight == true) {
$scope.DisableUI();
if ($scope.isSearchDataLoaded) {
@@ -1949,7 +1944,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#spinner').css('visibility', 'hidden');
}
- if ($scope.isExtract == true) {
+ if ($rootScope.isExtract == true) {
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
$scope.DisableUI();
@@ -1971,12 +1966,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//This block is executed when normal body is created and no further process like highlight,extract, etc
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
-
+
$scope.EnableUI();
}
}
-
+
}
console.log('DrawMirroredImage- ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
@@ -2217,7 +2212,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// alert(annotationText);
$scope.MultiLanguageAnnationArray = [];
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
@@ -2243,7 +2238,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
@@ -2255,7 +2250,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
else {
$scope.MultiLanguageAnnationArray = [];
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
@@ -2305,20 +2300,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var totalCanvas;
if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) {
totalCanvas = 9;
-
+
}
else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) {
totalCanvas = 5;
-
+
}
else if (($rootScope.viewOrientationId == '5')) {
totalCanvas = 4;
-
+
}
else if (($rootScope.viewOrientationId == '6')) {
totalCanvas = 1;
}
-
+
if ($scope.ColoredImageSRC.length < totalCanvas) {
$scope.ColoredImageSRC.push(
{
@@ -2333,7 +2328,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
);
}
-
+
var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId);
if (imageCanvas != null || imageCanvas != undefined) {
@@ -2347,7 +2342,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.coloredImageCanvasList[parseInt(bodyRegionId - 1)] = coloredImageDataVar;
}
-
+
if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
@@ -2373,14 +2368,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#spinner').css('visibility', 'hidden');
}
- if ($scope.isExtract == true) {
+ if ($rootScope.isExtract == true) {
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
$scope.DisableUI();
$scope.highLightBody();
}
else if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true))
- || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $scope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) {
+ || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $rootScope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) {
console.log('2. $rootScope.isHighLight= ' + $rootScope.isHighLight)
@@ -2404,7 +2399,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.EnableUI();
}
}
-
+
}
console.log('DrawImage- ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
@@ -2700,7 +2695,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// $timeout(function () { $scope.DisableProgressBar() }, 1000);
-
+
};
@@ -2987,27 +2982,27 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
-
+
};
worker.onerror = function (e) {
alert('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message);
};
-
+
}
}
$timeout(function () {
-
+
// alert($("#termList option").prop('selected', true).val());
// alert(document.getElementById("typedTermName").value);
// alert($rootScope.searchSelectedText);
- var termSelectedName = $rootScope.searchSelectedText;
- if (termSelectedName == "Cardiovascular") {
- termSelectedName = "Skin";
- }
- if (document.getElementById("typedTermName").value == "Skin" || termSelectedName == "Skin") {
+ var termSelectedName = $rootScope.searchSelectedText;
+ if (termSelectedName == "Cardiovascular") {
+ termSelectedName = "Skin";
+ }
+ if (document.getElementById("typedTermName").value == "Skin" || termSelectedName == "Skin") {
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
$scope.EnableUI();
@@ -3027,7 +3022,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.DisableUI();
$('.ui-slider').slider('disable');
-
+
if ($scope.isTransparencyActivated) {
$scope.layerNumber = $rootScope.currentLayerNumber;
@@ -3036,18 +3031,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.layerNumber = $('#txtlayerNumber').val();
$rootScope.currentLayerNumber = $scope.layerNumber;
}
-
+
$("#btnTranparency").attr('disabled', 'disabled');
-
-
+
+
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
if ($rootScope.isHighLight == true) {
- // $rootScope.isHighLight = false;
+ // $rootScope.isHighLight = false;
$scope.CloseTransparencyBox();
}
@@ -3061,8 +3056,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
.then(
function (result) {
- if (result.length == 0)
- {
+ if (result.length == 0) {
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
@@ -3148,7 +3142,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
- if ($scope.isExtract) {
+ if ($rootScope.isExtract) {
grayCanvasContext.putImageData($rootScope.whiteImageDataList[parseInt(TermExistInBodyRegionId) - 1], 0, 0);
}
@@ -3268,7 +3262,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#spinner').css('visibility', 'hidden')
$rootScope.isLoading = false;
-
+
//document.getElementById("daView").style.pointerEvents = "auto";
//debugger;
//$('.ui-slider').slider('enable');
@@ -3301,11 +3295,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
});
-
+
}
-
- $scope.scrollToHighlightedBodyRegion = function(TermExistInBodyRegionId){
+
+ $scope.scrollToHighlightedBodyRegion = function (TermExistInBodyRegionId) {
if ($scope.isScrolledToHighlightedBR == false) {
$scope.bodyRegionCoordinates = new jinqJs()
@@ -3396,7 +3390,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//get annotation from term number
$scope.GetAnnotationText = function (termNumber) {
-
+
$rootScope.annotationText = [];
var annotationText;
var annotation = [];
@@ -3406,8 +3400,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
$scope.TermNumber = termNumber;
for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) {
- if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined)
- {
+ if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) {
$scope.matchedTermNoData = new jinqJs()
.from($rootScope.TermNumberData.TermData.Term)
.where('_TermNumber == ' + termNumber)
@@ -3668,7 +3661,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//$scope.isMousUp();
-
+
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -3777,7 +3770,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
-
+
}
@@ -3817,7 +3810,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//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
//2.
-
+
if (event.ctrlKey) {
console.log('ctrl pressed');
$scope.multiAnnotationIsON = true;
@@ -3937,14 +3930,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
});
}
}
-
+
if (document.getElementById("btnStrutureBox").name == "showAnnotationStructure") {
$scope.showAnnotation()
}
else {
$scope.hideAnnotation()
}
-
+
if ($rootScope.isTBCompleted == true) {
$('#sppeachBubble').remove();
$('#dot').remove();
@@ -4228,7 +4221,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
+ ''
+ '
';
$("#sppeachBubble_annotation").css("height", "auto");
-
+
if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
$("#sppeachBubble_annotation p").remove();
$('#canvasDiv').append(sppechBubbleDotHTML_annotation);
@@ -4352,7 +4345,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function myFunction(crossId) {
-
+
$('#' + crossId).parent().parent().parent().css("display", "none");
}
@@ -4412,10 +4405,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
};
-
-
+
+
$scope.createTransparencyBox = function () {
-
+
$scope.isTransparencyBtnClicked = true;
//do not create TBOX if in extarct mode otherwise create
@@ -4430,7 +4423,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
-
+
$('#btnTranparency').addClass('tButtonActive');
$('#btnIdentify').removeClass(' btn-primary');
$('#btnIdentify').addClass('btn-black');
@@ -4441,17 +4434,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var canvasDiv = document.getElementById('canvasDiv');
- canvasDiv.addEventListener("touchstart", mouseDownListener);
+ canvasDiv.addEventListener("touchstart", mouseDownListener);
+
+ canvasDiv.addEventListener("touchmove", mouseMoveListener);
- canvasDiv.addEventListener("touchmove", mouseMoveListener);
-
- canvasDiv.addEventListener("touchend", mouseUpListener);
+ canvasDiv.addEventListener("touchend", mouseUpListener);
canvasDiv.addEventListener("mousedown", mouseDownListener);
canvasDiv.addEventListener("mousemove", mouseMoveListener);
- canvasDiv.addEventListener("mouseup", mouseUpListener);
+ canvasDiv.addEventListener("mouseup", mouseUpListener);
}
@@ -4481,9 +4474,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function mouseDownListener(e) {
- e.preventDefault();
- //to prevent screen scroll on ipad while drawing TB
- e.preventDefault();
+ e.preventDefault();
+ //to prevent screen scroll on ipad while drawing TB
+ e.preventDefault();
//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') {
@@ -4532,16 +4525,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
- document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
+ document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
//Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
- if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) {
+ if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) {
- var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber);
- console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal);
+ var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber);
+ console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal);
- $('#layerChangeSlider').slider("option", "value", sliderVal);
+ $('#layerChangeSlider').slider("option", "value", sliderVal);
$("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber));
}
@@ -4549,9 +4542,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function mouseMoveListener(e) {
- e.preventDefault();
- //to prevent screen scroll on ipad while drawing TB
- e.preventDefault();
+ e.preventDefault();
+ //to prevent screen scroll on ipad while drawing TB
+ e.preventDefault();
var canvasDiv = document.getElementById('canvasDiv');
$scope.verticalScrollPosition = canvasDiv.scrollTop;
@@ -4579,11 +4572,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
function mouseUpListener(e) {
- e.preventDefault();
-
+ e.preventDefault();
- //to prevent screen scroll on ipad while drawing TB
- e.preventDefault();
+
+ //to prevent screen scroll on ipad while drawing TB
+ e.preventDefault();
$scope.isTBDrawnOnBodyRegion = false;
@@ -4825,11 +4818,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener);
- document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
-
- document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener);
-
- document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener);
+ document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
+
+ document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener);
+
+ document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener);
// document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
$('#btnTranparency').removeClass('btn-black');
@@ -4880,13 +4873,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.switchToTransparencycanvas();
}
}
- else
- {
+ else {
$rootScope.UIWrapperZIndex = 12000;
-
+
$(".ui-wrapper").css("z-index", $rootScope.UIWrapperZIndex);
-
+
}
//hide the speechbubble
@@ -5070,7 +5062,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var modestyTransTempCanvasId = 'tempCanvasModesty_' + bodyRegionId;
var modestyTransCanvasId = 'modestyTransCanavs_' + bodyRegionId;
-
+
if (document.getElementById(modestyTransTempCanvasId) != null) {
document.getElementById(modestyTransTempCanvasId).parentNode.removeChild(document.getElementById(modestyTransTempCanvasId));
}
@@ -5093,7 +5085,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) {
-
+
var canvasModesty = document.createElement('canvas');
canvasModesty.id = modestyTransCanvasId;
canvasModesty.className = 'transModestyImg'
@@ -5115,7 +5107,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else
canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
-
+
canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
document.getElementById('canvasDiv').appendChild(canvasModesty);
@@ -5144,7 +5136,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var tempCtx = transparencyTempCanvas.getContext('2d');
if (IsMirror == 'Yes') {
-
+
tempCtx.save();
tempCtx.translate(Width, 0);
tempCtx.scale(-1, 1);
@@ -5210,11 +5202,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
tempMaskImg.src = tranparencyMaskImgSrc;//"http://localhost/AIA/" + tranparencyMaskImgSrc;
tempMaskImg.onload = function () {
-
+
var tempmaskCtx = transparencyTempcanavsMask.getContext('2d');
if (IsMirror == 'Yes') {
-
+
tempmaskCtx.save();
tempmaskCtx.translate(Width, 0);
tempmaskCtx.scale(-1, 1);
@@ -5255,14 +5247,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var modestyCanavs = document.getElementById(modestyTransCanvases[j].id);
if ($rootScope.isModestyOn == true && (parseInt(lowerlayerNumberForModesty) <= parseInt($scope.layerNumber)) && (HigherlayerNumberForModesty) > parseInt($scope.layerNumber)) {
-
+
$rootScope.isTBLayerLessSeven = true;
-
- modestyCanavs.style.visibility = 'visible';
-
+
+ modestyCanavs.style.visibility = 'visible';
+
}
else {
-
+
$rootScope.isTBLayerLessSeven = false;
modestyCanavs.style.visibility = 'hidden';
@@ -5495,7 +5487,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//}
}
-
+
// set every fourth value to the desired number of transparency
var imageD1 = tempCtx.getImageData(0, 0, Width, Height);
@@ -5504,7 +5496,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
for (var i = 3; i < length; i += 4) {
-
+
if ($scope.voId == "9" || $scope.voId == "11") {
if (imageData1[i] == 0) {
@@ -5570,13 +5562,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
ctx.putImageData(imageD1, 0, 0);
-
+
if ($rootScope.isModestyOn && $rootScope.isTBLayerLessSeven == true) {
-
+
document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'visible';
}
else {
-
+
document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'hidden';
}
@@ -5813,7 +5805,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// alert(annotationText);
$scope.MultiLanguageAnnationArray = [];
for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
-
+
$scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
}
if (annotationText == "undefined") {
@@ -5848,7 +5840,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.isMirrorBodyRegion = value.IsMirror;
return false;
}
-
+
}
});
}
@@ -5972,7 +5964,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.layerNumber = $scope.layerNumber + 1;
}
-
+
}
if (value.bodyRegionId == '3') {
@@ -5999,8 +5991,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
}
}
- else
- {
+ else {
if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
$scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
@@ -6087,7 +6078,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
function TransparencyCanvasClickListener(evt) {
// alert('tb clicked');
-
+
var pixelData;
var pixelDataTrans;
var mousePos = $scope.getMousePos(evt);
@@ -6262,7 +6253,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
//$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
@@ -6279,7 +6270,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
//$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);
}
@@ -6364,11 +6355,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.annotationTextArrayT1 = [];
$scope.annotationTextArrayT2 = [];
for (var i = 0; i <= annotations.annotationT1.length - 1; i++) {
- $scope.annotationTextArrayT1.push(annotations.annotationT1[i]);
+ $scope.annotationTextArrayT1.push(annotations.annotationT1[i]);
}
for (var i = 0; i <= annotations.annotationT2.length - 1; i++) {
- $scope.annotationTextArrayT2.push(annotations.annotationT2[i]);
+ $scope.annotationTextArrayT2.push(annotations.annotationT2[i]);
}
//$scope.annotationTextArrayT1.push(annotations.annotationT1);
// $scope.annotationTextArrayT2.push(annotations.annotationT2);
@@ -6396,8 +6387,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(evt);
//}
}
- else
- {
+ else {
$rootScope.getAnnotationTextBasedOnSelectedBodyRegion(evt);
}
}
@@ -6427,7 +6417,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//trans layer image data
var pixelDataTrans = maskCanvasContexttrans.getImageData(imgX, imgY, 1, 1);
// console.log('at the time' + pixelData.data[0])
-
+
var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope);
if ($('#speechBubble').length > 0)
$('#speechBubble').remove();
@@ -6694,7 +6684,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//var txtTransparencyChange = document.getElementById("txtTransparencyChange");
//txtTransparencyChange.value = 0;
// document.getElementById('txtLayerNumber').value = 0;
-
+
var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber);
console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal);
@@ -6774,7 +6764,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
};
-
+
function positionTooltip(event, x, y) {
// alert('positionTooltip')
@@ -6895,14 +6885,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.isNormalMode = false;
$rootScope.isGenderChnage = false;
$rootScope.isViewChange = false;
-
+
//if listanager is visisble then close it
$rootScope.CloseListManager();
// $rootScope.isHighlightBodyByBodySystem = false;
-
+
$('#sppeachBubble').css('display', 'none');
$("#dot").css("display", "none");
@@ -7053,7 +7043,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.enableHighlight = function () {
$scope.DisableUI();
-
+
$("#btnTranparency").removeAttr('disabled', 'disabled');
//if listanager is visisble then close it
@@ -7161,7 +7151,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
-
+
//1.
$scope.flushCanvas();
@@ -7347,7 +7337,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.enableShowHideStructureBox = function () {
-
+
//if listanager is visisble then close it
@@ -7456,7 +7446,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var colorMode;
- if ($scope.isExtract == true) {
+ if ($rootScope.isExtract == true) {
if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true || ($rootScope.isHighlightBodyByBodySystem == true || $scope.isbodySystemHighlight == true)) {
@@ -7523,7 +7513,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var grayImageData = context_gray.getImageData(0, 0, width, ht);
var grayImageImageDataVar = grayImageData.data;
- if ($scope.isExtract == true) {
+ if ($rootScope.isExtract == true) {
if (value.haveMirror == 'true') {
$rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
}
@@ -7568,7 +7558,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($scope.isEligibleForHighlightBodyByTermList == true) {
- if ((($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined))||( $scope.isbodySystemHighlight == true && $rootScope.isHighLight == true)) {
+ if ((($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) || ($scope.isbodySystemHighlight == true && $rootScope.isHighLight == true)) {
$scope.isLoading = true;
@@ -7688,8 +7678,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var colorMode;
- if ($scope.isExtract == true) {
- if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true || $rootScope.isHighlightBodyByBodySystem==true || $scope.isbodySystemHighlight==true) {
+ if ($rootScope.isExtract == true) {
+ if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true || $rootScope.isHighlightBodyByBodySystem == true || $scope.isbodySystemHighlight == true) {
colorMode = $scope.applyWhiteMatrix(img, context);
}
@@ -7728,7 +7718,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var grayImageData = context.getImageData(0, 0, width, ht);
var grayImageImageDataVar = grayImageData.data;
- if ($scope.isExtract == true) {
+ if ($rootScope.isExtract == true) {
if (value.haveMirror == 'true') {
$rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
}
@@ -7783,8 +7773,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
}
- if (!$("#btnExtract").hasClass("btn-primary"))
- {
+ if (!$("#btnExtract").hasClass("btn-primary")) {
$("#btnHighLight").addClass("btn-primary");
$("#btnHighLight").removeClass("btn-black");
@@ -7862,7 +7851,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.getTermNumberList = function (actualTermNo) {
-
+
if ($rootScope.TermNumberData != null) {
$scope.termList = new jinqJs()
@@ -8056,7 +8045,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.isHighlightBodyByBodySystem = false;
$rootScope.CloseListManager();
})
-
+
$scope.loadSelectedBodyView = function (currentBodyViewId) {
//remove transaprency scale
@@ -8073,7 +8062,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
DataService.getJson(layerJsonPath)
.then(
function (result) {
-
+
$rootScope.BodyLayerData = result;
@@ -8119,7 +8108,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($rootScope.TermNumberData != undefined) {
$scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
- if ($scope.TermList != null && $scope.TermList.length>0) {
+ if ($scope.TermList != null && $scope.TermList.length > 0) {
$scope.setLayerNumberAndHighlightByTermList();
}
else {
@@ -8128,16 +8117,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.CalculateImageCordinates($rootScope.viewOrientationId)
}
}
-
+
}
else {
$scope.CalculateImageCordinates($rootScope.viewOrientationId);
-
+
// $("#btnTranparency").remove("disabled");
$('#txtlayerNumber').val($scope.layerNumber)
-
+
}
@@ -8157,11 +8146,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
);
}
-
+
$scope.OnViewChange = function (event) {
$scope.DisableUI();
if ($("[title='" + event.target.title + "']").parent().hasClass("active") == true) {
-
+
}
else {
@@ -8416,8 +8405,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadNavigatorForSelectedBodyView(data.reloadDABodyViewId);
- if($scope.layerNumber!= 0) {
- $scope.EnableUI();
+ if ($scope.layerNumber != 0) {
+ $scope.EnableUI();
}
}
// $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
@@ -8504,7 +8493,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//body highlight options functinality
$scope.LoadBodySystemData = function (event) {
- event.stopPropagation();
+ event.stopPropagation();
$("#structureDropdown").toggle();
$("#genderChangeId").css("display", "none");
$("#viewID").css("display", "none");
@@ -8519,24 +8508,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
angular.forEach(systemList, function (value, key) {
systemListHtml = systemListHtml + '- ' + value._Name + '
'
- })
+ })
systemListHtml = systemListHtml + '
';
$('#bodySystem').append(systemListHtml);
-
- // var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
- // DataService.getJson(bodySystemDataPath)
- //.then(
- // function (result) {
- // $rootScope.BodySystemData = result;
+ // var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
+ // DataService.getJson(bodySystemDataPath)
+ //.then(
+ // function (result) {
- // },
- // function (error) {
- // console.log(error.statusText)
- // }
- // )
+ // $rootScope.BodySystemData = result;
+
+ // },
+ // function (error) {
+ // console.log(error.statusText)
+ // }
+ // )
}
@@ -8562,14 +8551,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#viewID").css("display", "none");
var $ua = navigator.userAgent;
if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- $(".custom-tooltip").css("display","none");
- $(".custom-tooltip1").css("display","none");
- $(".custom-tooltip2").css("display","none");
+ $(".custom-tooltip").css("display", "none");
+ $(".custom-tooltip1").css("display", "none");
+ $(".custom-tooltip2").css("display", "none");
}
-
+
});
$scope.HighlightBodyByBodySystem = function (event) {
+
+ $rootScope.isExtract = false;
+
$("#structureDropdown").toggle();
$scope.DisableUI();
@@ -8581,7 +8573,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.systemNumber = event.currentTarget.id;
-
+
if ($rootScope.systemNumber == 0) {
console.log("inside HighlightBodyByBodySystem ..came inside current structure");
@@ -8602,9 +8594,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($rootScope.isHighLight == false) {
//color the body gray
- $rootScope.isHighLight = true
- console.log('highLightBody from HighlightBodyByBodySystem')
- $scope.highLightBody();
+ console.log('highLightBody from HighlightBodyByBodySystem');
+
+ $rootScope.isHighLight = true;
+
+ if ($rootScope.isExtract = true) {
+ $rootScope.isExtract = false;
+ $scope.CalculateImageCordinates($rootScope.viewOrientationId);
+ }
+ else
+ $scope.highLightBody();
}
else {
//This else is when user seraced anything then change the view and clicked on highlight options
@@ -8636,7 +8635,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
-
+
var viewtarget_highlightbody = angular.element(event.currentTarget);
var title_highlightbody = viewtarget_highlightbody.attr('title');
@@ -8664,7 +8663,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
- $scope.removeCurrentHighlightedBodySystem = function(){
+ $scope.removeCurrentHighlightedBodySystem = function () {
for (var i = 0; i < $rootScope.grayImageDataList.length; i++) {
var grayCanvasID = 'imageCanvas' + parseInt(i + 1);
@@ -8897,7 +8896,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
-
+
$scope.ShowSearch = function () {
if (($rootScope.vocabTermDataArray != null || $rootScope.vocabTermDataArray != undefined) && ($rootScope.vocabTermDataArray.length > 0)) {
var primaryLexiconIndex;
@@ -8953,12 +8952,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$compile($e2)($scope);
document.getElementById("termlistfilter").style.display = "block";
$timeout(function () {
- $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
- if ($(this).find("a").html() == document.getElementById("typedTermName").value) {
- $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" });
- $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" });
- }
- });
+ $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
+ if ($(this).find("a").html() == document.getElementById("typedTermName").value) {
+ $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" });
+ $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" });
+ }
+ });
}, 100);
$timeout(function () {
$rootScope.searchListArray = [];
@@ -8977,12 +8976,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}, 500);
}
- else
- {
- $rootScope.loadSearchData();
- $scope.ShowSearch();
-
-
+ else {
+ $rootScope.loadSearchData();
+ $scope.ShowSearch();
+
+
}
}
@@ -9065,7 +9063,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//list manager
$scope.$on('listManagerEvent', function (event, data) {
-
+
if ($rootScope.islistManagerEventAlredayDispachted == true) {
$('#spinner').css('visibility', 'visible');
@@ -9119,7 +9117,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
});
-
+
$scope.loadListManger = function () {
var primaryLexiconIndex;
if ($rootScope.vocabTermDataArray != null && $rootScope.vocabTermDataArray != undefined && $rootScope.vocabTermDataArray.length > 0) {
@@ -9199,15 +9197,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
-
+
$scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) {
-
+
$scope.DisableUI();
$rootScope.searchSelectedText = $("#" + actualTermNumber).text();
-
+
$rootScope.slectedActualTermNumber = actualTermNumber;
if (isTermListOptionClicked == true) {
@@ -9237,7 +9235,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
$("div#backdrop #termlistfilter li").find("a[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
$scope.terminateCurrentlyRunningWPs();
-
+
$rootScope.isListManagerSelected = true;
//---
if ($rootScope.isListManagerSelected == true) {
@@ -9378,7 +9376,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber);
console.log('inside setLayerNumberAndHighlightByTermList. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - parseInt($scope.layerNumber): ' + parseInt($scope.layerNumber) + ' = set value for layerChangeSlider: ' + sliderVal);
- $('#layerChangeSlider').slider("option", "value",sliderVal );
+ $('#layerChangeSlider').slider("option", "value", sliderVal);
//8.remove current layer canavses
// $scope.flushCanvas();
@@ -9484,7 +9482,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.aligneCanvasWithTerm = function () {
console.log('aligneCanvasWithTerm')
-
+
var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA));
var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA));
@@ -9670,7 +9668,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
-
+
$("#txtlayerNumber").val($rootScope.totalLayers);
}
@@ -9695,7 +9693,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LayerValueChangeBasedOnKeyUp = function (e) {
-
+
if (e.keyCode == 13) {
if ($("#txtlayerNumber").val() == '') {
@@ -9714,7 +9712,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
else {
if (keyUplayerNumber > $rootScope.totalLayers) {
-
+
$("#txtlayerNumber").val($rootScope.totalLayers);
$scope.layerNumber = parseInt($rootScope.totalLayers);
@@ -9734,12 +9732,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var layerInputVal = $("#txtlayerNumber").val();
if (layerInputVal <= $rootScope.totalLayers) {
-
+
$("#txtlayerNumber").val(layerInputVal);
-
+
}
else {
-
+
$("#txtlayerNumber").val($rootScope.totalLayers);
}
}
@@ -9800,7 +9798,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.resetSearchListView = function () {
- $scope.ShowSearch();
+ $scope.ShowSearch();
}
}])
@@ -9825,10 +9823,9 @@ function OnViewChange(event) {
function OnBodySystemSelection(event) {
console.log('OnBodySystem chnaged is called outside ');
var scope = angular.element(document.getElementById("daView")).scope();
-
- scope.$apply(function ()
- {
+
+ scope.$apply(function () {
scope.HighlightBodyByBodySystem(event);
});
}
@@ -9924,7 +9921,7 @@ function OnIdentifyClick() {
}
function OnZoom() {
-
+
var scope = angular.element(document.getElementById("daView")).scope();
scope.DisableUI();
@@ -9939,7 +9936,7 @@ function OnZoom() {
scope.enableZoom();
});
-
+
}
function onListManagerTermSelection(id, isTermListOptionClicked) {
@@ -9972,5 +9969,5 @@ function viewChange(event) {
if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
$(".custom-tooltip2").toggle();
}
-
+
}