').appendTo('#grid-view');
@@ -70,7 +82,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
var SelectedCAthumbImage = [];
SelectedCAthumbImage = new jinqJs()
- .from($scope.selectedCAlistViewData)
+ .from($scope.selectedCAListViewData)
.where('_id = ' + id)
.select('_ThumbnailImage', '_Summary', '_id', '_Title');
@@ -82,11 +94,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
}
else {
- if ($scope.searchCAlistViewData.length > 0) {
+ if ($scope.searchCAListViewData.length > 0) {
var SelectedCAthumbImage = [];
SelectedCAthumbImage = new jinqJs()
- .from($scope.searchCAlistViewData)
+ .from($scope.searchCAListViewData)
.where('_id = ' + id)
.select('_ThumbnailImage', '_Summary', '_id', '_Title');
@@ -101,22 +113,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
$scope.Reset = function (query) {
- query.selectedbodyregion = "";
- query.selectedbodysystem = "";
- query.selectedspecialty = "";
+ query.selectedbodyregion = null;
+ query.selectedbodysystem = null;
+ query.selectedspecialty = null;
$scope.filterstring = false;
- while ($scope.searchCAlistViewData.length) {
- $scope.searchCAlistViewData.pop();
+ while ($scope.searchCAListViewData.length) {
+ $scope.searchCAListViewData.pop();
}
$('#grid-view').empty();
- angular.forEach($scope.selectedCAlistViewData, function (value, key) {
+ angular.forEach($scope.selectedCAListViewData, function (value, key) {
$scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage;
- var $el = $('
'
- + '
'
- + ''
- + '
' + value._Title + '
').appendTo('#grid-view');
+ var $el = $('
'
+ + '
'
+ + ''
+ + '
' + value._Title + '
').appendTo('#grid-view');
$compile($el)($scope);
@@ -130,12 +142,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
}
+ // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file.
$scope.ApplySearch = function (query) {
$scope.filterstring = true;
- while ($scope.searchCAlistViewData.length) {
- $scope.searchCAlistViewData.pop();
+ while ($scope.searchCAListViewData.length) {
+ $scope.searchCAListViewData.pop();
}
$('#grid-view').empty();
@@ -151,7 +164,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
filtercount = filtercount + 1;
}
- angular.forEach($scope.selectedCAlistViewData, function (value, key) {
+ angular.forEach($scope.selectedCAListViewData, function (value, key) {
var selectimg = true;
var count = 0;
@@ -199,10 +212,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
$scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage;
- var $el = $('
'
- + '
'
- + ''
- + '
' + value._Title + '
').appendTo('#grid-view');
+ var $el = $('
'
+ + '
'
+ + ''
+ + '
' + value._Title + '
').appendTo('#grid-view');
$compile($el)($scope);
@@ -213,7 +226,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
});
- $scope.searchCAlistViewData.push(
+ $scope.searchCAListViewData.push(
{
"_id": value._id,
"_ImageId": value._ImageId,
@@ -231,6 +244,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B
});
+
+ //Show Error Message in case of gridview if no data is found
+ if ($scope.searchCAListViewData.length == 0) {
+
+ var $el = $('
No animation found for the selected search criteria!
').appendTo('#grid-view');
@@ -142,8 +160,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.filterstring = true;
- while ($scope.searchCIlistViewData.length) {
- $scope.searchCIlistViewData.pop();
+ while ($scope.searchCIListViewData.length) {
+ $scope.searchCIListViewData.pop();
}
$('#grid-view').empty();
@@ -165,7 +183,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
filtercount = filtercount + 1;
}
- angular.forEach($scope.selectedCIlistViewData, function (value, key) {
+ angular.forEach($scope.selectedCIListViewData, function (value, key) {
var selectimg = true;
var count = 0;
@@ -239,7 +257,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage;
- var $el = $('
'
+ var $el = $('
'
+ '
'
+ ''
+ '
' + value._Title + '
').appendTo('#grid-view');
@@ -253,7 +271,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
});
- $scope.searchCIlistViewData.push(
+ $scope.searchCIListViewData.push(
{
"_id": value._id,
"_ImageId": value._ImageId,
@@ -273,6 +291,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
});
+
+ //Show Error Message in case of gridview if no data is found
+ if ($scope.searchCIListViewData.length == 0) {
+
+ var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view');
+ $compile($el)($scope);
+ }
}
@@ -290,12 +315,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") {
var CITitle = [];
CITitle = new jinqJs()
- .from($scope.selectedCIlistViewData)
+ .from($scope.selectedCIListViewData)
.where('_id = ' + $event.currentTarget.id)
.select('_Title');
// console.log(CITitle);
- // console.log($scope.selectedCIlistViewData);
+ // console.log($scope.selectedCIListViewData);
$rootScope.ViewTitle = CITitle[0]._Title;
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 5594e29..ba1c54b 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.imagePath = "";
$rootScope.BodyRegionData;
$rootScope.BodyRegionCordinatesData;
- $scope.isTransparencyActivated;
+ $scope.isTransparencyActivated = false;
$rootScope.BodyLayerData;
$rootScope.VocabTermData;
@@ -84,7 +84,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.updatedWhiteImageMRDataList = [];
//normal mode
- $rootScope.isNormalMode = false;
+ $rootScope.isNormalMode = true;
$rootScope.isZoomed = false;
//navigator man functionality
@@ -165,7 +165,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//get the DA body view list based on selected gender
$scope.getDAViewList = function ($event) {
-
+
if ($('#MainImage') != null) {
$('#MainImage').remove();
}
@@ -244,7 +244,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage;
-
+
var $el = $('
'
+ ''
@@ -265,7 +265,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.openView = function ($event) {
-
+
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -422,6 +422,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//0.1
var currentBodyViewId = localStorage.getItem("currentBodyViewId");
+ $scope.loadSearchDataForBodyView();
+
+
console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId);
var openViews;
@@ -499,7 +502,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//1. load navigator man first
$scope.LoadBodyViewNavigatorImage();
- $scope.loadSearchDataForBodyView();
+ //$scope.loadSearchDataForBodyView();
$scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
@@ -525,7 +528,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.loadSearchDataForBodyView = function () {
-
+
console.log('loadSearchDataForBodyView');
var currentBodyViewId = localStorage.getItem("currentBodyViewId");
@@ -682,7 +685,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.LoadDefaultLayerImage = function () {
-
+
$rootScope.isNormalMode = true;
$scope.layerNumber = 0;
@@ -724,6 +727,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//calculate coordinates for body region images
$scope.CalculateImageCordinates = function (viewOrientationId) {
+ // annotation toolbar canvas
+ if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {
+
+ $("#canvasDiv").append('');
+ $scope.BindCanvasDrawingListners();
+ // $rootScope.FreeStylePaint();
+
+ }
+
$scope.terminateCurrentlyRunningWPs();
var drawnBodyRegionCount = [];
@@ -945,7 +957,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//set scrollbars on canvas and hide loading label
$('#daLoaderLabel').css('visibility', 'hidden')
-
+
$('#canvasDiv').css('overflow', 'scroll')
if (isiOSSafari) {
$('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150)
@@ -954,7 +966,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else {
$('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
}
-
+
// $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
$('#canvasDiv').scrollTop(50)
@@ -966,40 +978,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top.
// #4976 :While changing gender male to female scroll bar is going on top.
var canvasDiv = document.getElementById('canvasDiv');
- canvasDiv.scrollTop = 0;
+ if (canvasDiv != null || canvasDiv != undefined) {
+ canvasDiv.scrollTop = 0;
- //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image
- var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image
+ //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image
- if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) {
+ var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image
- var dragdivw = 42
- $scope.dragdivleft = 21;
- $scope.dragdivtop = 0;
+ if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) {
- $scope.dragdivposition = {
- "left": 21,
- "top": 0
- };
- }
- else {
- var dragdivw = 83;
+ var dragdivw = 42
+ $scope.dragdivleft = 21;
+ $scope.dragdivtop = 0;
- $scope.dragdivleft = 0;
- $scope.dragdivtop = 0;
+ $scope.dragdivposition = {
+ "left": 21,
+ "top": 0
+ };
+ }
+ else {
+ var dragdivw = 83;
- $scope.dragdivposition = {
- "left": 0,
- "top": 0
+ $scope.dragdivleft = 0;
+ $scope.dragdivtop = 0;
- };
+ $scope.dragdivposition = {
+ "left": 0,
+ "top": 0
+
+ };
+ }
}
-
+
$('#draggable').css('width', dragdivw);
$('#draggable').css('height', dragdivh)
+
}
function scaleRectangle(x, y, height, width, mirrorValue) {
@@ -1059,7 +1075,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.GetImageSource = function (bodyRegionId) {
-
+
var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
//set max for LayerNumber input
@@ -1077,7 +1093,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.userInput = parseInt($scope.layerNumber);
-
+
$scope.skinTone = $rootScope.globalSetting.ethnicity;
var SelectedLayerData = [];
@@ -1139,7 +1155,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.GetBackgroundImgSource = function (bodyRegionId) {
-
+
var selectedGender;
if (localStorage.getItem("genderId") == "Male") {
@@ -1157,7 +1173,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($scope.bagartBodyRegionDetails != null || $scope.bagartBodyRegionDetails != undefined) {
//filter bodyRegion data basd on skintone
- $scope.skinTone = $rootScope.globalSetting.ethnicity
+ $scope.skinTone = $rootScope.globalSetting.ethnicity
$scope.bagartDetailsOnSktn = new jinqJs()
.from($scope.bagartBodyRegionDetails)
.where('_Skintone == ' + $scope.skinTone)
@@ -1193,11 +1209,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
FlipedImgCanvas.style.left = x + "px";
FlipedImgCanvas.style.top = y + "px";
-
+
if (isMaskImage == 'Y') {
+
FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci';
- FlipedImgCanvas.style.visibility = 'hidden'
+ FlipedImgCanvas.style.visibility = 'hidden';
+
}
else {
@@ -1218,6 +1236,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
FlipedImgCanvas.addEventListener('click', function (evt) {
+
//to get correct data on multihighlight highlight
if ($scope.isLayerChange == true) {
$scope.isLayerChange = false;
@@ -1294,6 +1313,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
var RGBColor = (Red + Green + Blue);
+ $rootScope.previousHighlightList.push(RGBColor);
+
+
if ($rootScope.isHighLight) {
if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) {
@@ -1331,15 +1353,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
- $rootScope.previousHighlightList.push(RGBColor);
+ // $rootScope.previousHighlightList.push(RGBColor);
$scope.highLightBodyBasedOnIcolor(RGBColor);
}
- if ($rootScope.isNormalMode == true) {
+ //if ($rootScope.isNormalMode == true) {
+
+ // $rootScope.previousHighlightList.push(RGBColor);
+ //}
- $rootScope.previousHighlightList.push(RGBColor);
+ //extarct clicked body part is extarct button is already enabled.
+ // debugger;
+ if ($rootScope.isExtract == true) {
+ $scope.enableExtract(false);
}
var annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
@@ -1417,22 +1445,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
context.scale(-1, 1);
context.drawImage(img, 0, 0);
context.restore();
+
+
+ if (isMaskImage == 'N') {
- if (isMaskImage == 'N') {
+ $scope.ColoredImageSRC.push(
+ {
+ "bodyRegionId": bodyRegionId, "SRC": src,
+ "Height": h,
+ "Width": w,
+ "x": x,
+ "y": y,
+ "haveMirror": 'true'
+ }
+ );
-
- $scope.ColoredImageSRC.push(
- {
- "bodyRegionId": bodyRegionId, "SRC": src,
- "Height": h,
- "Width": w,
- "x": x,
- "y": y,
- "haveMirror": 'true'
- }
- );
-
// console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
@@ -1455,9 +1483,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.isEligibleForHighlight = false;
}
- if ($scope.isEligibleForHighlight == true)
- {
- if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
+ if ($scope.isEligibleForHighlight == true) {
+ 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.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -1489,9 +1516,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
);
}
};
-
+
+
if (document.getElementById('canvasDiv') != null)
document.getElementById('canvasDiv').appendChild(FlipedImgCanvas);
+
+
@@ -1619,6 +1649,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
+ $rootScope.previousHighlightList.push(RGBColor);
if ($rootScope.isHighLight == true) {
if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) {
@@ -1657,7 +1688,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
- $rootScope.previousHighlightList.push(RGBColor);
+ // $rootScope.previousHighlightList.push(RGBColor);
if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { }
@@ -1668,8 +1699,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- if ($rootScope.isNormalMode == true) {
- $rootScope.previousHighlightList.push(RGBColor);
+ //if ($rootScope.isNormalMode == true) {
+ // $rootScope.previousHighlightList.push(RGBColor);
+ //}
+
+ // debugger;
+ //extarct clisked body part is extarct button is already enabled.
+ if ($rootScope.isExtract == true) {
+ $scope.enableExtract(false);
}
if ($('#speechBubbleTrns').length > 0)
@@ -1733,30 +1770,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
img.src = src;
-
+
function start() {
- //debugger;
+
context.drawImage(img, 0, 0);
+
+
if (isMaskImage == 'N') {
if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
//do nothing
}
else {
-
- $scope.ColoredImageSRC.push(
- {
- "bodyRegionId": bodyRegionId, "SRC": src,
- "Height": h,
- "Width": w,
- "x": x,
- "y": y,
- "haveMirror": 'false'
- }
-
- );
-
+
+ $scope.ColoredImageSRC.push(
+ {
+ "bodyRegionId": bodyRegionId, "SRC": src,
+ "Height": h,
+ "Width": w,
+ "x": x,
+ "y": y,
+ "haveMirror": 'false'
+ }
+
+ );
+
if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
@@ -1776,15 +1815,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.isEligibleForHighlight = false;
}
- if ($scope.isEligibleForHighlight == true)
- {
-
- if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
+ if ($scope.isEligibleForHighlight == true) {
+
+ 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.isLoading = true;
$('#spinner').css('visibility', 'visible');
-
+
console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
$rootScope.isHighLight = true;
@@ -1793,7 +1831,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.highLightBody();
console.log('just after highLightBody call');
-
+
}
}
}
@@ -1844,16 +1882,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.HighlightBodyOnExtract = function () {
+ console.log(' insode HighlightBodyOnExtract. $rootScope.MaskCanvasData length= ' + $rootScope.MaskCanvasData.length + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length)
-
var multiTermList = [];
var CallBackBodyRegion = [];
if ($rootScope.isListManagerSelected) {
-
+
multiTermList = $scope.AllTerms;
-
- }
+
+ }
else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) {
angular.forEach($rootScope.previousHighlightList, function (value, key) {
@@ -1879,7 +1917,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//terminate previous running workers to create space for new workers
-
+ $scope.layerNumber = $('#txtlayerNumber').val();
$scope.terminateCurrentlyRunningWPs();
$timeout(function () {
@@ -1967,7 +2005,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var canvasId = (e.data.canvasId).replace('_mci', '');
- //debugger;
+
//for (var i = 1; i <= updatedData.length; i++) {
var grayCanvasID = canvasId;
@@ -2003,7 +2041,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($rootScope.multiAnnotationIsON == true) {
- //debugger;
+
if (canvasId.match('_MR'))
$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData;
else
@@ -2052,6 +2090,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// $rootScope.updatedGrayDataList = null;
// $rootScope.updatedGrayDataList = [];
//}
+
+ $scope.layerNumber = $('#txtlayerNumber').val();
+
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -2205,7 +2246,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var bodyRegionId = e.data.bodyRegionId;
var canvasId = (e.data.canvasId).replace('_mci', '');
- //debugger;
+
//for (var i = 1; i <= updatedData.length; i++) {
var grayCanvasID = canvasId;
@@ -2225,7 +2266,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- //debugger;
+
if (canvasId.match('_MR')) {
$rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData;
@@ -2257,14 +2298,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
if ($scope.doAligneCanvasWithTerm == true) {
- //debugger;
- if ($scope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true)
+
+ if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true)
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
- $scope.isHighlightBodyByBodySystem = false;
+ // $rootScope.isHighlightBodyByBodySystem = false;
if ($rootScope.isListManagerSelected == true)
$scope.aligneCanvasWithTerm();
@@ -2288,9 +2329,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var multiTermList = [];
angular.forEach($rootScope.previousHighlightList, function (value, key) {
-
- //debugger;
-
var ActualTermNo = $scope.getActualTermNumber(value);
if (ActualTermNo != null) {
var TermList = $scope.getTermNumberList(ActualTermNo);
@@ -2351,8 +2389,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//get annotation from term number
$scope.GetAnnotationText = function (termNumber) {
- //debugger;
-
+
var annotationText;
//0
var figLeafTermNo = 5868; // to do declare constant for this
@@ -2387,8 +2424,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) {
- // debugger;
-
+
var Annotation;
$scope.ActualTermNo = actualTermNo;
if ($rootScope.VocabTermData != null || $rootScope.VocabTermData != undefined) {
@@ -2416,10 +2452,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//layer change function
$scope.LayerChange = function () {
-
+
//if listanager is visisble then close it
- $rootScope.isListManagerSelected = false;
-
+ // $rootScope.isListManagerSelected = false;
+
$rootScope.CloseListManager();
@@ -2435,13 +2471,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
$scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
- // debugger;
// $('#daLoaderLabel').css('visibility', 'visible');
-
if ($scope.isTransparencyActivated) {
-
+
//crete temp canavs to store the original data which will be used to chnange the transparency
if (document.getElementById('tempCanvas') != null) {
$('#tempCanvas').remove();
@@ -2463,7 +2497,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (document.getElementById('canvasDiv') != null)
document.getElementById('canvasDiv').appendChild(tempCanvas);
- // //debugger;
+
var tCanvas = document.getElementById('transparencyCanvas');
var tCanvasContext = tCanvas.getContext('2d');
@@ -2510,7 +2544,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else {
-
+
//1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box.
var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) {
@@ -2542,11 +2576,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
$('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition)
- if ($scope.isHighlightBodyByBodySystem) {
+
+ if ($rootScope.isHighlightBodyByBodySystem) {
$timeout(function () { $scope.DisableProgressBar() }, 20000);
}
- else
- {
+ else {
$timeout(function () { $scope.DisableProgressBar() }, 2000);
}
}
@@ -2554,9 +2588,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));
}
- $scope.LayerChangeOnMouseUpDown = function (e)
- {
-
+ $scope.LayerChangeOnMouseUpDown = function (e) {
+ //'x' button is displaying inside the input box in IE browser.
+
+ if (e.currentTarget.id == "incrmntVal") {
+
+ var layerInputVal = $("#txtlayerNumber").val();
+ if (layerInputVal != $rootScope.totalLayers) {
+ var layerInputValInc = parseInt(layerInputVal) + 1;
+ $scope.layerNumber = parseInt(layerInputValInc);
+ $("#txtlayerNumber").val($scope.layerNumber);
+ }
+
+ }
+ else {
+
+ var layerInputVal = $("#txtlayerNumber").val();
+ if (layerInputVal > 0) {
+ var layerInputValDec = parseInt(layerInputVal) - 1;
+ $scope.layerNumber = parseInt(layerInputValDec);
+ $("#txtlayerNumber").val($scope.layerNumber);
+ }
+
+
+ }
$scope.LayerChange();
}
@@ -2594,6 +2649,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
console.log('highLightBody call from DisableProgressBar')
+
// $scope.highLightBody();
@@ -2633,6 +2689,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
@@ -2704,8 +2761,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$(".com").css("display", "none");
$("#bord").css({ "width": "0px", "display": "none" });
var sppechBubbleDotHTML = ''
- + '
'
- + ''
+ + '
'
+ + ''
+ '
'
+ '
'
@@ -2846,7 +2903,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 = "
";
+ var sppechBubbleHTML_annotation = "
";
if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
if (Exists_annotation == 0) {
$("#canvasDiv").append(sppechBubbleHTML_annotation);
@@ -2949,7 +3006,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#" + sub_id_annotation).append("
" + MultipleLang_annotation_T1 + "
");
}
- $("#" + sub_id_annotation).append("");
+ $("#" + sub_id_annotation).append("");
for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) {
var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k];
@@ -3072,8 +3129,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#bord_annotation").css({ "width": "0px", "display": "none" });
var sppechBubbleDotHTML_annotation = ''
- + '
'
- + ''
+ + '
'
+ + ''
+ '
'
+ '
'
@@ -3090,7 +3147,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#sppeachBubble_annotation").append("
" + MultipleLang_annotation_T1 + "
");
}
- $("#sppeachBubble_annotation").append("");
+ $("#sppeachBubble_annotation").append("");
for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) {
var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k];
@@ -3167,7 +3224,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#sppeachBubble_annotation").append("
" + MultipleLang_annotation_T1 + "
");
}
- $("#sppeachBubble_annotation").append("");
+ $("#sppeachBubble_annotation").append("");
for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) {
var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k];
@@ -3277,7 +3334,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) {
- var sppechBubbleHTML = "
";
+ var sppechBubbleHTML = "
";
//Issue #7286 :Undefined annotation should not appear
for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
var annotation = $scope.MultiLanguageAnnationArray[i];
@@ -3422,31 +3479,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.createTransparencyBox = function () {
+ $scope.isTransparencyActivated = true;
- //if listanager is visisble then close it
-
- $rootScope.isListManagerSelected = false;
- $rootScope.CloseListManager();
+ //do not create TBOX if in extarct mode otherwise create
+ if ($rootScope.isExtract == false) {
+ $("#btnExtract").addClass("disabled");
- $scope.isTransparencyActivated = true;
- // alert('transparencyClicked' + $scope.isTransparencyActivated)
- $('#btnTranparency').addClass('tButtonActive');
- $('#btnIdentity').removeClass(' btn-primary');
- $('#btnIdentity').addClass('btn-black');
+ //if listanager is visisble then close it
+ $rootScope.isListManagerSelected = false;
+ $rootScope.CloseListManager();
- var canvasDiv = document.getElementById('canvasDiv');
- $scope.verticalScrollPosition = canvasDiv.scrollTop;
- $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
- var canvasDiv = document.getElementById('canvasDiv');
- canvasDiv.addEventListener("mousedown", mouseDownListener);
- canvasDiv.addEventListener("mousemove", mouseMoveListener);
+ // alert('transparencyClicked' + $scope.isTransparencyActivated)
+ $('#btnTranparency').addClass('tButtonActive');
+ $('#btnIdentity').removeClass(' btn-primary');
+ $('#btnIdentity').addClass('btn-black');
- canvasDiv.addEventListener("mouseup", mouseUpListener)
+ var canvasDiv = document.getElementById('canvasDiv');
+ $scope.verticalScrollPosition = canvasDiv.scrollTop;
+ $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
-
+ var canvasDiv = document.getElementById('canvasDiv');
+ canvasDiv.addEventListener("mousedown", mouseDownListener);
+
+ canvasDiv.addEventListener("mousemove", mouseMoveListener);
+
+ canvasDiv.addEventListener("mouseup", mouseUpListener)
+
+ }
+ else {
+
+ // console.log("extract button is active");
+
+ }
}
function mouseDownListener(e) {
@@ -3554,7 +3621,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.TransparencyEndX = TransparencyEndX;
$scope.TransparencyBoxEndY = TransparencyBoxEndY;
-
+ $scope.layerNumberBeforeTrans = parseInt($('#txtlayerNumber').val());
//draw temp box to store the canvas data with original transparecy
if (document.getElementById('tempCanvas') != null) {
@@ -3673,7 +3740,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('#btnTranparency').addClass('tButtonActive');
//debugger;
- $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1);
+ // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1);
//Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
$('#btnTranparency').removeClass('tButtonActive');
$('#btnTranparency').addClass('btn-black');
@@ -3836,19 +3903,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//do nothing
}
else if (isLayerChanged) {
-
- // alert('isMousUp on isLayerChanged');
- $scope.layerNumber = parseInt($('#txtlayerNumber').val());
+ // alert('isMousUp on isLayerChanged');
+
+ //$scope.layerNumber = parseInt($('#txtlayerNumber').val());
}
else {
- var currentLayer = parseInt($('#txtlayerNumber').val());
+ //var currentLayer = parseInt($('#txtlayerNumber').val());
+
+ //var tranparencyLayer = currentLayer + 1;
+ //$scope.layerNumber = tranparencyLayer;
+
+ var tranparencyLayer;
+
+ //var currentLayer = parseInt($('#txtlayerNumber').val());
+ var currentLayer = $scope.layerNumberBeforeTrans;
+
+ if (currentLayer == $rootScope.totalLayers) {
+
+ tranparencyLayer = currentLayer;
+
+ }
+
+ else {
+
+ tranparencyLayer = currentLayer + 1;
+
+ }
- var tranparencyLayer = currentLayer + 1;
$scope.layerNumber = tranparencyLayer;
+
}
+ $('#txtlayerNumber').val($scope.layerNumber);
+
//dedebugger;
//1. get the image source
var tranparencyImgSrc;
@@ -4522,6 +4611,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.CloseTransparencyBox = function () {
+
+ //To enable extract button
+ $scope.isTransparencyActivated = false;
+ $("#btnExtract").removeClass("disabled");
+
$('.com_anno').css('display', 'none');
$('#sppeachBubble_annotation').css('display', 'none');
@@ -4556,7 +4650,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//var scope = angular.element(document.getElementById("DAView")).scope();
//scope.$apply(function () {
// $scope.layerNumber = 0;
- $scope.isTransparencyActivated = false;
+ // $scope.isTransparencyActivated = false;
//})
@@ -4575,7 +4669,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$('#transparencyScale').css('visibility', 'hidden');
- $scope.isTransparencyActivated = false;
+ //$scope.isTransparencyActivated = false;
// document.getElementById('btnTranparency').className = 't-transparency'
$('#btnTranparency').removeClass('tButtonActive');
$('#btnTranparency').addClass('btn-black');
@@ -4630,18 +4724,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
};
- $scope.OnIdentityClick = function () {
+ $scope.IdentityClick = function () {
//if listanager is visisble then close it
-
+
$rootScope.isListManagerSelected = false;
$rootScope.CloseListManager();
// $('#btnIdentity').addClass('btn-primary');
- if ($scope.isTransparencyActivated == true) {
+ if ($scope.isTransparencyActivated == true) {
- $scope.isTransparencyActivated = false;
+ $scope.isTransparencyActivated = false;
var canvasDiv = document.getElementById('canvasDiv');
canvasDiv.removeEventListener("mousedown", mouseDownListener);
@@ -4657,12 +4751,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.enableZoom = function () {
-
+ $("#btnExtract").removeClass("disabled");
+ $("#btnTranparency").removeClass("disabled");
+ $rootScope.isTransparencyBoxActivated = false;
+ $rootScope.isNormalMode = false;
//if listanager is visisble then close it
- $rootScope.isListManagerSelected = false;
$rootScope.CloseListManager();
+ $rootScope.isHighlightBodyByBodySystem = false;
+
+
$('#sppeachBubble').css('display', 'none');
$("#dot").css("display", "none");
@@ -4677,7 +4776,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isZoomed = true;
//1.
-
+
$scope.flushCanvas();
if ($scope.zoomInOut == 25) {
@@ -4766,8 +4865,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// }
// }
//}
+ var loopLength = 0;
+ if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) {
+ loopLength = 7;
+ }
+ else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')){
+ loopLength = 5;
+ }
+ else if (($rootScope.viewOrientationId == '5')) {
+ loopLength = 4;
+ }
+ else if (($rootScope.viewOrientationId == '6')) {
+ loopLength = 1;
+ }
- for (var i = 1; i < 7; i++) {
+ for (var i = 1; i < loopLength; i++) {
var id;
var maskId;
@@ -4783,17 +4895,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (maskcanvas != null || maskcanvas != undefined)
document.getElementById('canvasDiv').removeChild(maskcanvas);
- if (i == 4 || i == 5 || i == 6) {
- id = 'imageCanvas' + i + '_MR';
- maskId = 'imageCanvas' + i + '_MR_mci';
+ if (loopLength == 7) {
+
+ if (i == 4 || i == 5 || i == 6) {
+ id = 'imageCanvas' + i + '_MR';
+ maskId = 'imageCanvas' + i + '_MR_mci';
- var canvas = document.getElementById(id);
- if (canvas != null || canvas != undefined)
- document.getElementById('canvasDiv').removeChild(canvas);
+ var canvas = document.getElementById(id);
+ if (canvas != null || canvas != undefined)
+ document.getElementById('canvasDiv').removeChild(canvas);
- var maskcanvas = document.getElementById(maskId);
- if (maskcanvas != null || maskcanvas != undefined)
- document.getElementById('canvasDiv').removeChild(maskcanvas);
+ var maskcanvas = document.getElementById(maskId);
+ if (maskcanvas != null || maskcanvas != undefined)
+ document.getElementById('canvasDiv').removeChild(maskcanvas);
+ }
}
//remove modesty canavs
@@ -4804,6 +4919,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
}
+
+
}
$scope.terminateCurrentlyRunningWPs = function () {
@@ -4824,11 +4941,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.enableHighlight = function () {
+ // $("#btnExtract").removeClass("disabled");
+ $("#btnTranparency").removeClass("disabled");
+ // $rootScope.isTransparencyBoxActivated = false;
+ // $rootScope.isNormalMode = false;
+
//if listanager is visisble then close it
// $rootScope.isListManagerSelected = false;
$rootScope.CloseListManager();
+ $rootScope.isHighlightBodyByBodySystem = false;
+
if ($rootScope.isHighLight == true) {
}
@@ -4881,18 +5005,27 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#btnNormalMode").removeClass("btn-primary");
}
+ //7900
+ $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition);
+ $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition);
+
+
}
$scope.enableNormalMode = function () {
-
+ $("#btnTranparency").removeClass("disabled");
+ $rootScope.isNormalMode = false;
console.log('enableNormalMode is called');
-
+
// $rootScope.isHighLight = false;
//to do should not call every time
$rootScope.CloseListManager();
-
+
+
+ $rootScope.isHighlightBodyByBodySystem = false;
+
if ($rootScope.isNormalMode == true) {
@@ -4922,11 +5055,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isListManagerSelected = false;
//7.
+
+ $scope.layerNumber = $('#txtlayerNumber').val();
$scope.CalculateImageCordinates($rootScope.viewOrientationId);
// alert($rootScope.viewOrientationId + "gadash")
+
+
$("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition);
$("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition);
-
+
}
@@ -4953,83 +5090,130 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
- $scope.enableExtract = function () {
+ $scope.enableExtract = function (isCalledFromButton) {
+
+ console.log('isCalledFromButton= ' + isCalledFromButton);
+
+ $rootScope.isHighlightBodyByBodySystem = false;
+
$rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
- //if listanager is visisble then close it
- // $rootScope.isListManagerSelected = false;
- $rootScope.CloseListManager();
- //1.
- $rootScope.isLoading = true;
- $('#spinner').css('visibility', 'visible');
- //2.
- $scope.terminateCurrentlyRunningWPs();
- //3.
- if ($rootScope.isExtract == true) {
+ if ($scope.isTransparencyActivated == true) {
+
+ $("#btnExtract").addClass("disabled");
}
+
+
else {
- $rootScope.isExtract = true;
- if ($rootScope.isNormalMode == true) {
+ $rootScope.CloseListManager();
+ //1.
+ //$rootScope.isLoading = true;
+ //$('#spinner').css('visibility', 'visible');
- $rootScope.isHighLight = false;
- $rootScope.isNormalMode = false;
- }
- else {
- $rootScope.isNormalMode = false;
- $rootScope.isHighLight = false;
- }
+ //2.
+ $scope.terminateCurrentlyRunningWPs();
- //4.
- console.log('highLightBody from enableExtract')
- $scope.highLightBody();
+ //3.
+ //if extarct is alraedy enabled and user cliked on any body part then extract that.
+ if (isCalledFromButton == false) {
+ $rootScope.isExtract = true;
+ //disable transparency button
- }
+ $("#btnTranparency").addClass("disabled");
- //5. unhighlight other
- //$scope.Normal = "";
- //$scope.Extract = "LeftButtonsDefaultState";
- //$scope.Highlight = "";
- $("#btnExtract").addClass("btn-primary");
- $("#btnExtract").removeClass("btn-black");
+ if ($rootScope.isNormalMode == true) {
- if (!$("#btnNormalMode").hasClass("btn-black")) {
- $("#btnNormalMode").addClass("btn-black");
- }
+ $rootScope.isHighLight = false;
+ $rootScope.isNormalMode = false;
+ }
+ else {
- if (!$("#btnHighLight").hasClass("btn-black")) {
- $("#btnHighLight").addClass("btn-black");
- }
+ $rootScope.isHighLight = false;
+ }
- if ($("#btnNormalMode").hasClass("btn-primary")) {
- $("#btnNormalMode").removeClass("btn-primary");
- }
+ //4.
+ console.log('highLightBody from enableExtract')
+ $scope.highLightBody();
- if ($("#btnHighLight").hasClass("btn-primary")) {
- $("#btnHighLight").removeClass("btn-primary");
- }
- }
+ }
+ else {
- $scope.enableShowHideStructureBox = function () {
+ if ($rootScope.isExtract == true) {
+ }
+ else {
+ $rootScope.isExtract = true;
+ //disable transparency button
- //if listanager is visisble then close it
+ $("#btnTranparency").addClass("disabled");
- $rootScope.isListManagerSelected = false;
- $rootScope.CloseListManager();
- $(".com").toggle();
- $('#dot').toggle();
- $('#sppeachBubble').toggle();
+ if ($rootScope.isNormalMode == true) {
+
+ $rootScope.isHighLight = false;
+ $rootScope.isNormalMode = false;
+ }
+ else {
+
+ $rootScope.isHighLight = false;
+ }
+
+ //4.
+ console.log('highLightBody from enableExtract')
+ $scope.highLightBody();
+
+
+ }
+ }
+
+
+ //5. unhighlight other
+ //$scope.Normal = "";
+ //$scope.Extract = "LeftButtonsDefaultState";
+ //$scope.Highlight = "";
+
+ $("#btnExtract").addClass("btn-primary");
+ $("#btnExtract").removeClass("btn-black");
+
+ if (!$("#btnNormalMode").hasClass("btn-black")) {
+ $("#btnNormalMode").addClass("btn-black");
+ }
+
+ if (!$("#btnHighLight").hasClass("btn-black")) {
+ $("#btnHighLight").addClass("btn-black");
+ }
+
+ if ($("#btnNormalMode").hasClass("btn-primary")) {
+ $("#btnNormalMode").removeClass("btn-primary");
+ }
+
+ if ($("#btnHighLight").hasClass("btn-primary")) {
+ $("#btnHighLight").removeClass("btn-primary");
+ }
+ }
+ }
+
+ $scope.enableShowHideStructureBox = function () {
+
+
+ //if listanager is visisble then close it
+
+ $rootScope.isListManagerSelected = false;
+ $rootScope.CloseListManager();
+
+ $(".com").toggle();
+ $('#dot').toggle();
+ $('#sppeachBubble').toggle();
}
@@ -5037,8 +5221,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.highLightBody = function () {
- $rootScope.isLoading = true;
- $('#spinner').css('visibility', 'visible');
$scope.Normal = "";
$scope.Extract = "";
@@ -5123,194 +5305,160 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var colorMode;
if ($scope.isExtract == true) {
- colorMode = $scope.applyWhiteMatrix(img, context_gray);
+
+ if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true) {
+
+ colorMode = $scope.applyWhiteMatrix(img, context_gray);
+ }
}
else {
colorMode = $scope.applyGrayMatrix(img, context_gray);
}
- var zeroPoint = new Point();
+ console.log('colorMode inside if = ' + colorMode);
- DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
+ if (colorMode != undefined || colorMode != null) {
- context_gray.putImageData(DAData.data, 0, 0)
+ $rootScope.isLoading = true;
+ $('#spinner').css('visibility', 'visible');
- //NIKI- to resolve lateral arm black issue in highlight mode
- if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) {
+ var zeroPoint = new Point();
- var imgData = context_gray.getImageData(0, 0, width, ht);
- var data = imgData.data;
- var c = 0;
- for (var i = 0; i < data.length; i += 4) {
- if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) {
- data[i + 3] = 0;
- }
+ DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
- }
- context_gray.putImageData(imgData, 0, 0);
- }
- //push BRID into array
- $scope.grayedBR.push({ 'BRID': value.bodyRegionId });
+ context_gray.putImageData(DAData.data, 0, 0)
- var grayImageData = context_gray.getImageData(0, 0, width, ht);
- var grayImageImageDataVar = grayImageData.data;
+ //NIKI- to resolve lateral arm black issue in highlight mode
- if ($scope.isExtract == true) {
- if (value.haveMirror == 'true') {
- $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
- }
- else {
+ if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) {
- $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
- }
- else {
+ var imgData = context_gray.getImageData(0, 0, width, ht);
+ var data = imgData.data;
+ var c = 0;
+ for (var i = 0; i < data.length; i += 4) {
+ if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) {
+ data[i + 3] = 0;
+ }
- if (value.haveMirror == 'true') {
- $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ context_gray.putImageData(imgData, 0, 0);
}
- else {
- $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
- }
+ //push BRID into array
+ $scope.grayedBR.push({ 'BRID': value.bodyRegionId });
+ var grayImageData = context_gray.getImageData(0, 0, width, ht);
+ var grayImageImageDataVar = grayImageData.data;
- if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
+ if ($scope.isExtract == true) {
+ if (value.haveMirror == 'true') {
+ $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ else {
+
+ $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ }
}
else {
- $scope.isEligibleForHighlightBodyByTermList = false;
+ if (value.haveMirror == 'true') {
+ $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ else {
+
+ $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ }
}
- if ($scope.isEligibleForHighlightBodyByTermList == true) {
- //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
- // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
- $scope.isLoading = false;
- $('#spinner').css('visibility', 'hidden');
- //}
+ if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else {
-
- if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
+ $scope.isEligibleForHighlightBodyByTermList = false;
+ }
+ if ($scope.isEligibleForHighlightBodyByTermList == true) {
+ //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
+ // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
+ $scope.isLoading = false;
- $scope.isLoading = true;
+ $('#spinner').css('visibility', 'hidden');
+ //}
- $('#spinner').css('visibility', 'visible');
- $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
- }
- else if ($rootScope.isListManagerSelected == true) {
+ if (($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
- // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
- $timeout(function () {
$scope.isLoading = true;
+
$('#spinner').css('visibility', 'visible');
+ $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
+ }
+ else if ($rootScope.isListManagerSelected == true) {
- $scope.HighlightBodyByTermList($scope.AllTerms)
- }, 800);
+ // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
+ $timeout(function () {
+
+ $scope.isLoading = true;
+ $('#spinner').css('visibility', 'visible');
+
+ $scope.HighlightBodyByTermList($scope.AllTerms)
+ }, 800);
+
+ }
+ else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
+ $scope.createTermListByPreviousTermsAndHighlight();
+ }
- }
- else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
- $scope.createTermListByPreviousTermsAndHighlight();
}
}
}
- }
-
- $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
+ $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
+ console.log('highlightboy. $rootScope.isExtract= '+$rootScope.isExtract+', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length)
+ if ($rootScope.isExtract == true) {
+ if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
+ console.log('1. $rootScope.isExtract=true and $rootScope.previousHighlightList != null')
- if ($rootScope.isExtract == true) {
- if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
- console.log('1. $rootScope.isExtract=true and $rootScope.previousHighlightList != null')
+ $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
+ }
+ else if ($rootScope.isListManagerSelected == true) {
+ console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true')
- $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
- }
- else if ($rootScope.isListManagerSelected == true) {
- console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true')
+ $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
- $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
-
+ }
}
}
- //else {
- // // this code is for the case where user first clcik on normal mode then extract then again highlight then we need to call highlight body in gray mode
- // //and then highlight the previously selected body regions at the time of normal mode.
- // if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
- // if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
- // $scope.isEligibleForHighlightBodyByTermList = true;
- // }
- // else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
- // $scope.isEligibleForHighlightBodyByTermList = true;
- // }
- // else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
- // $scope.isEligibleForHighlightBodyByTermList = true;
- // }
- // else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
- // $scope.isEligibleForHighlightBodyByTermList = true;
- // }
-
-
- // }
-
- // //
- //}
})
- //if ($scope.isEligibleForHighlightBodyByTermList == true) {
- // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
-
- // var multiTermList = [];
- // angular.forEach($rootScope.previousHighlightList, function (value, key) {
-
- // //debugger;
-
- // var ActualTermNo = $scope.getActualTermNumber(value);
- // if (ActualTermNo != null) {
- // var TermList = $scope.getTermNumberList(ActualTermNo);
- // if (TermList != null) {
- // for (var i = 0; i < TermList.length; i++) {
-
- // multiTermList.push(TermList[i]);
- // }
- // }
- // }
-
- // });
- // console.log('HighlightBodyByTermList call with multiTermList')
-
- // $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
- // }
- //}
-
}
else {
// This code will execute when user will select normal Mode but this time isHighlight will be false
+ console.log('highlightboy ELSE. $rootScope.isExtract= ' + $rootScope.isExtract + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length)
angular.forEach($scope.ColoredImageSRC, function (value, key) {
var id;
@@ -5365,40 +5513,50 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var colorMode;
if ($scope.isExtract == true) {
- colorMode = $scope.applyWhiteMatrix(img, context);
+ if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true) {
+
+ colorMode = $scope.applyWhiteMatrix(img, context);
+ }
}
- var zeroPoint = new Point();
+ console.log('colorMode inside else = ' + colorMode);
+ if (colorMode != undefined || colorMode != null) {
- DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
+ $rootScope.isLoading = true;
+ $('#spinner').css('visibility', 'visible');
- context.putImageData(DAData.data, 0, 0)
+ var zeroPoint = new Point();
- var grayImageData = context.getImageData(0, 0, width, ht);
- var grayImageImageDataVar = grayImageData.data;
+ DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
- if ($scope.isExtract == true) {
- if (value.haveMirror == 'true') {
- $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
- }
- else {
+ context.putImageData(DAData.data, 0, 0)
- $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
- }
- else {
+ var grayImageData = context.getImageData(0, 0, width, ht);
+ var grayImageImageDataVar = grayImageData.data;
+
+ if ($scope.isExtract == true) {
+ if (value.haveMirror == 'true') {
+ $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ else {
- if (value.haveMirror == 'true') {
- $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ }
}
else {
- $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ if (value.haveMirror == 'true') {
+ $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ else {
+
+ $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ }
}
}
- }
- $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
+ $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
+ }
})
if ($rootScope.isExtract == true) {
@@ -5414,7 +5572,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else if ($rootScope.isListManagerSelected == true) {
console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true')
$timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
-
+
}
}
@@ -5495,11 +5653,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.OnGenderChange = function (event) {
+
+
+ $("#btnExtract").removeClass("disabled");
+ $("#btnTranparency").removeClass("disabled");
+ $rootScope.isTransparencyBoxActivated = false;
+ $rootScope.isNormalMode = false;
+
+ //close transparecny box
+ $scope.CloseTransparencyBox();
+
//if listanager is visisble then close it
-
- // $rootScope.isListManagerSelected = false;
+
+ // $rootScope.isListManagerSelected = false;
$rootScope.CloseListManager();
+ // $rootScope.isHighlightBodyByBodySystem = false;
+
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -5517,6 +5687,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
localStorage.setItem("currentBodyViewId", currentBodyViewId);
//3.
+ $scope.layerNumber = 0;
$scope.loadSelectedBodyView(currentBodyViewId);
//4.
@@ -5544,6 +5715,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
localStorage.setItem("currentBodyViewId", currentBodyViewId);
//3.
+ $scope.layerNumber = 0;
$scope.loadSelectedBodyView(currentBodyViewId);
//4.
@@ -5600,7 +5772,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//To fix issue of gray maintained in after closing jspanel after listmanager selection
$rootScope.isListManagerSelected = false;
$rootScope.isHighLight = false;
- $rootScope.isNormalMode = false;
+ //$rootScope.isNormalMode = false;
+ $rootScope.isHighlightBodyByBodySystem = false;
$rootScope.CloseListManager();
})
@@ -5639,18 +5812,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
canDiv.innerHTML = '';
}
//if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender
-
- if (($rootScope.isListManagerSelected == true) && ($rootScope.isGenderChnage == true)) {
-
- $scope.setLayerNumberAndHighlightByTermList();
-
- }
-
- else {
-
- $scope.CalculateImageCordinates($rootScope.viewOrientationId);
-
- }
+
+ if (($rootScope.isListManagerSelected == true) && (($rootScope.isGenderChnage == true) || $rootScope.isViewChange == true)) {
+
+ $scope.setLayerNumberAndHighlightByTermList();
+
+ }
+
+ else {
+
+ $scope.CalculateImageCordinates($rootScope.viewOrientationId);
+
+ }
$scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
},
@@ -5670,11 +5843,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.OnViewChange = function (event) {
+
+ $("#btnExtract").removeClass("disabled");
+ $("#btnTranparency").removeClass("disabled");
+ $rootScope.isTransparencyBoxActivated = false;
+ $rootScope.isNormalMode = false;
+
+ //close transparency box
+ $scope.CloseTransparencyBox();
+
//if listanager is visisble then close it
- $rootScope.isListManagerSelected = false;
+ //$rootScope.isListManagerSelected = false;
$rootScope.CloseListManager();
+ // $rootScope.isHighlightBodyByBodySystem = false;
+
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -5832,23 +6016,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.layerNumber = parseInt($('#txtlayerNumber').val());
//alert('mouseUp');
-
- $scope.loadSelectedBodyView(data.reloadDABodyViewId);
+ if ($scope.layerNumber == 0) {
+ $scope.loadSelectedBodyView(data.reloadDABodyViewId);
+ }
+ // $scope.loadSelectedBodyView(data.reloadDABodyViewId);
$scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId);
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
//$rootScope.isSettingEventAlredayDispachted = false;
//}
})
-
- $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
+ $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
+
//$rootScope.voId = currentBodyViewId;
//$scope.skinTone = $rootScope.globalSetting.ethnicity;
@@ -5905,7 +6091,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.$on('annotationToolEvent', function (event, data) {
$("#canvas").css("display", "block");
$("#canvasPaint").css("display", "block");
- $scope.doClick();
+ $scope.BindCanvasDrawingListners();
$rootScope.FreeStylePaint();
});
$scope.mousePs;
@@ -5921,12 +6107,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.offsetY1 = 0;
$scope.x = 0;
$scope.y = 0;
- $scope.doClick = function (event) {
+ $scope.BindCanvasDrawingListners = function (event) {
$scope.clicked = true;
// OnPaintCanvasMouseDown(event);
- canvas.addEventListener('mousedown', $scope.OnPaintCanvasMouseDown, false);
- canvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false);
+
+ var annotationCanvas = document.getElementById('canvas');
+ if (annotationCanvas != null || annotationCanvas != undefined) {
+ annotationCanvas.addEventListener('mousedown', $scope.OnPaintCanvasMouseDown, false);
+ annotationCanvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false);
+ }
// alert("doclick");
};
@@ -5966,6 +6156,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.resetText = 0;
$rootScope.resetTextSave = 0;
$rootScope.ObjectIndexSave = 0;
+
var arrayRect = {};
@@ -6013,7 +6204,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
break;
case "Line":
-
+
$rootScope.resetLine = $rootScope.ObjectIndex++;
$('#canvas').addLayer({
name: 'Line_' + $rootScope.resetLine,
@@ -6025,7 +6216,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
rounded: true,
x1: $scope.offsetX1, y1: $scope.offsetY1,
x2: $scope.x, y2: $scope.y,
-
+
click: function (layer) {
$rootScope.canvasLayerNameCollection = [];
$rootScope.canvasLayerNameCollection.push(layer.name);
@@ -6094,10 +6285,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
resizeFromCenter: false,
- dblclick: function () {
+ dblclick: function () {
// $rootScope.backOpacity();
-
- },
+
+ },
click: function (layer) {
$rootScope.canvasLayerNameCollection = [];
@@ -6174,7 +6365,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
click: function (layer) {
- // alert(layer.name);
+
$rootScope.canvasLayerNameCollection = [];
$rootScope.canvasLayerNameCollection.push(layer.name);
$('#canvas').setLayer(layer.name, {
@@ -6190,7 +6381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
},
mouseout: function (layer) {
$rootScope.canvasLayerNameCollection = [];
-
+
$('#canvas').setLayer(layer.name, {
handle: {
type: 'arc',
@@ -6317,7 +6508,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
x2: $scope.x, y2: $scope.y,
click: function (layer) {
-
+
$rootScope.shapeTypePin = "Pin";
$rootScope.canvasLayerNameCollection = [];
var pinLine_layer = layer.name;
@@ -6341,7 +6532,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
},
mouseout: function (layer) {
-
+
$rootScope.canvasLayerNameCollection = [];
$('#canvas').setLayer(layer.name, {
handle: {
@@ -6404,8 +6595,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('.btnCursor').addClass('activebtncolor');
break;
case "TextArea":
- $rootScope.IsTextAlreadySave = false;
- $("#text_area").val('');
+ $rootScope.IsTextAlreadySave = false;
+ $("#text_area").val('');
// Draw text
$rootScope.resetTextRect = $rootScope.ObjectIndex++;
$rootScope.resetText = $rootScope.ObjectIndex++;
@@ -6423,7 +6614,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
align: "left",
fontFamily: 'Verdana, sans-serif',
text: ''
-
+
})
// Draw rect as wide as the text
.drawRect({
@@ -6487,9 +6678,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#annotationTextModal").modal("toggle");
$('.btnCursor').trigger('click');
+
$("#text_area").val('');
+
$("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
+
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass");
+
$(".btn-annotation").removeClass("activebtncolor");
+
$('.btnCursor').addClass('activebtncolor');
break;
@@ -6502,6 +6709,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
+
//-- TextArea functionality of Annotation toolbar
$rootScope.fontSizes;
@@ -6516,271 +6724,441 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.modifySavedText = [];
$rootScope.TextRectangleArr = [];
$rootScope.rectDimension = [];
-
+
// will refactor this code later
-
+
$rootScope.saveText = function () {
// this part will work first time when save button will be clicked
if ($rootScope.IsTextAlreadySave == false) {
// getting textarea style properties
- $rootScope.fontSizes = $("#text_area").css("font-size");
- $rootScope.fontWeight = $("#text_area").css("font-weight");
- $rootScope.fontStyle = $("#text_area").css("font-style");
- $rootScope.textAlignmt = $("#text_area").css("text-align");
- $rootScope.fontColor = $("#text_area").css("color");
- $rootScope.fontFamily = $("#text_area").css("font-family");
- $rootScope.underlineText = $("#text_area").css("text-decoration");
- $rootScope.textArea = $("#text_area").val();
+ $rootScope.fontSizes = $("#text_area").css("font-size");
+ $rootScope.fontWeight = $("#text_area").css("font-weight");
+ $rootScope.fontStyle = $("#text_area").css("font-style");
+ $rootScope.textAlignmt = $("#text_area").css("text-align");
+ $rootScope.fontColor = $("#text_area").css("color");
+ $rootScope.fontFamily = $("#text_area").css("font-family");
+ $rootScope.underlineText = $("#text_area").css("text-decoration");
+ $rootScope.textArea = $("#text_area").val();
// deleting previous text area
- $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers();
- $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
-
- // Text After Saving in Rectangle
- $('#canvas').drawText({
- layer: true,
- draggable: true,
- name: 'TextArea_' + $rootScope.resetText,
- groups: ['TextArea_' + $rootScope.resetText],
- dragGroups: ['TextArea_' + $rootScope.resetText],
- fillStyle: $rootScope.fontColor,
- fontStyle: $rootScope.fontStyle,
- fontSize: $rootScope.fontSizes,
- fontFamily: $rootScope.fontFamily,
- align: $rootScope.textAlignmt,
- strokeWidth: 0,
- text: $rootScope.textArea,
- x: $scope.offsetX1, y: $scope.offsetY1,
- maxWidth: $scope.x - $scope.offsetX1,
- maxHeight: $scope.y - $scope.offsetY1,
- add: function (layer) {
- $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' });
- $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily });
+ $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers();
+ $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
+
+ // Text After Saving in Rectangle
+ $('#canvas').drawText({
+ layer: true,
+ draggable: true,
+ name: 'TextArea_' + $rootScope.resetText,
+ groups: ['TextArea_' + $rootScope.resetText],
+ dragGroups: ['TextArea_' + $rootScope.resetText],
+ fillStyle: $rootScope.fontColor,
+ fontStyle: $rootScope.fontWeight + " " + $rootScope.fontStyle,
+ fontSize: $rootScope.fontSizes,
+ fontFamily: $rootScope.fontFamily,
+ align: $rootScope.textAlignmt,
+ strokeWidth: 0,
+ text: $rootScope.textArea,
+ x: $scope.offsetX1, y: $scope.offsetY1,
+ maxWidth: $scope.x - $scope.offsetX1,
+ maxHeight: $scope.y - $scope.offsetY1,
+ add: function (layer) {
+ $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' });
+ $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily, TextDecoration: $rootScope.underlineText });
}
- })
- // Draw rectangle
- .drawRect({
- name: 'TextArea1_' + $rootScope.resetText,
- layer: true,
- draggable: true,
- groups: ['TextArea_' + $rootScope.resetText],
- dragGroups: ['TextArea_' + $rootScope.resetText],
- opacity: $rootScope.shapestyleOpacity,
- strokeStyle: $rootScope.shapestyleborderColor,
- strokeWidth: $rootScope.shapestyleborderWidth,
- x: $scope.offsetX1, y: $scope.offsetY1,
- width: $scope.x - $scope.offsetX1,
- height: $scope.y - $scope.offsetY1,
- click: function (layer) {
- $rootScope.shapeTypeText = "textAreaRect";
-
- var layerNameSplit = layer.name;
- var splitedName = layerNameSplit.split("_");
- var textValName = "TextArea_";
- var concatinateResult = textValName.concat(splitedName[1]);
- $rootScope.canvasLayerNameCollection = [];
- $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
- $('#canvas').setLayer(layer.name, {
- handle: {
- type: 'rectangle',
- fillStyle: '#fff',
- strokeStyle: '#c33',
- strokeWidth: 2,
- width: 5, height: 5,
- cornerRadius: 3
- }
- }).drawLayers();
- },
- dblclick: function (layer) {
- $rootScope.IsTextAlreadySave = true;
-
- var _rectLayerOnSave = layer.name;
- var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
- var TextAreaRectName = "TextArea_";
- var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]);
- $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated });
- $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
- var _rectLayerOnSaveSplitInt;
- if (_rectLayerOnSaveSplit[1] >= 3)
- _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2);
- else
- _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]);
- var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1;
- $("#text_area").val(b);
- $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize);
- $("#text_area").css("font-weight", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle);
- $("#text_area").css("font-style", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle);
- $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align);
- $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor);
- $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily);
- $("#text_area").css("text-decoration", $rootScope.underlineText);
- _rectLayerOnSaveSplitInt = ''; b = '';
- $("#annotationTextModal").modal("toggle");
- },
- mouseout: function (layer) {
- $rootScope.canvasLayerNameCollection = [];
- $('#canvas').setLayer(layer.name, {
- handle: {
- type: 'rectangle',
- fillStyle: 'pink',
- strokeStyle: 'yellow',
- strokeWidth: 0,
- width: 0, height: 0,
- cornerRadius: 0
- }
- }).drawLayers();
- },
- mouseover: function (layer) {
- $('#canvas').setLayer(layer.name, {
- handle: {
- type: 'rectangle',
- fillStyle: '#fff',
- strokeStyle: '#c33',
- strokeWidth: 2,
- width: 5, height: 5,
- cornerRadius: 3
- }
- }).drawLayers();
-
- }
- });
- $("#text_area").val('');
- $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
-
- }
-
-// this part will work second time when save button will be clicked
- else {
- // getting textarea style properties
- var _modifiedText = $("#text_area").val();
- var _modifiedFontSize = $("#text_area").css("font-size");
- var _modifiedFontWeight = $("#text_area").css("font-weight");
- var _modifiedFontStyle = $("#text_area").css("font-style");
- var _modifiedTextAlign = $("#text_area").css("text-align");
- var _modifiedFontColor = $("#text_area").css("color");
- var _modifiedFontFamily = $("#text_area").css("font-family");
- var _modifiedFontDecoration = $("#text_area").css("text-decoration");
-
- // deleting previous textarea
- $("#canvas").removeLayer($rootScope.modifySavedText[0].RectText).drawLayers();
- $("#canvas").removeLayer($rootScope.modifySavedText[0].TextName).drawLayers();
- $rootScope.resetTextRectSave = $rootScope.ObjectIndexSave++;
- $rootScope.resetTextSave = $rootScope.ObjectIndexSave++;
-
- // generating new text area
- $('#canvas').drawText({
- layer: true,
- draggable: true,
- name: 'TextAreaAfterEdit_' + $rootScope.resetTextSave,
- groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
- dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
- fillStyle: _modifiedFontColor,
- fontStyle: _modifiedFontStyle,
- fontSize: _modifiedFontSize,
- fontFamily: _modifiedFontFamily,
- align: _modifiedTextAlign,
- strokeWidth: 0,
- text: _modifiedText,
- x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
- maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
- maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height
-
- })
- // Draw rect as wide as the text
- .drawRect({
- name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave,
- layer: true,
- draggable: true,
- groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
- dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
- opacity: $rootScope.shapestyleOpacity,
- strokeStyle: $rootScope.shapestyleborderColor,
- strokeWidth: $rootScope.shapestyleborderWidth,
- x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
- width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
- height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
- click: function (layer) {
- $rootScope.shapeTypeText = "textAreaRect";
- var layerNameSplit = layer.name;
- var splitedName = layerNameSplit.split("_");
- var textValName = "TextAreaAfterEdit_";
+ })
+ // Draw rectangle
+ .drawRect({
+ name: 'TextArea1_' + $rootScope.resetText,
+ layer: true,
+ draggable: true,
+ groups: ['TextArea_' + $rootScope.resetText],
+ dragGroups: ['TextArea_' + $rootScope.resetText],
+ opacity: $rootScope.shapestyleOpacity,
+ strokeStyle: $rootScope.shapestyleborderColor,
+ strokeWidth: $rootScope.shapestyleborderWidth,
+ x: $scope.offsetX1, y: $scope.offsetY1,
+ width: $scope.x - $scope.offsetX1,
+ height: $scope.y - $scope.offsetY1,
+ click: function (layer) {
+ $rootScope.shapeTypeText = "textAreaRect";
+
+ var layerNameSplit = layer.name;
+ var splitedName = layerNameSplit.split("_");
+ var textValName = "TextArea_";
var concatinateResult = textValName.concat(splitedName[1]);
$rootScope.canvasLayerNameCollection = [];
- $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
-
- $('#canvas').setLayer(layer.name, {
- handle: {
- type: 'rectangle',
- fillStyle: '#fff',
- strokeStyle: '#c33',
- strokeWidth: 2,
- width: 5, height: 5,
- cornerRadius: 3
- }
- }).drawLayers();
-
- },
- dblclick: function (layer) {
-
- $rootScope.IsTextAlreadySave = true;
- var _rectLayerOnSave = layer.name;
- var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
- var RectNameAfterEdit = "TextAreaAfterEdit_";
- var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]);
- $rootScope.modifySavedText.push({ TextName: layer.name, RectText: RectNameAfterEditResult });
- $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
- $("#text_area").val(_modifiedText);
- $("#text_area").css("font-size", _modifiedFontSize);
- $("#text_area").css("font-weight", _modifiedFontWeight);
- $("#text_area").css("font-style", _modifiedFontStyle);
- $("#text_area").css("text-align", _modifiedTextAlign);
- $("#text_area").css("color", _modifiedFontColor);
- $("#text_area").css("font-family", _modifiedFontFamily);
- $("#text_area").css("text-decoration", _modifiedFontDecoration);
- $("#annotationTextModal").modal("toggle");
- },
- mouseout: function (layer) {
- $rootScope.canvasLayerNameCollection = [];
- $('#canvas').setLayer(layer.name, {
- handle: {
- type: 'rectangle',
- fillStyle: 'pink',
- strokeStyle: 'yellow',
- strokeWidth: 0,
- width: 0, height: 0,
- cornerRadius: 0
- }
- }).drawLayers();
- },
- mouseover: function (layer) {
- $('#canvas').setLayer(layer.name, {
- handle: {
- type: 'rectangle',
- fillStyle: '#fff',
- strokeStyle: '#c33',
- strokeWidth: 2,
- width: 5, height: 5,
- cornerRadius: 3
- }
- }).drawLayers();
-
- }
- });
+ $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3
+ }
+ }).drawLayers();
+ },
+ dblclick: function (layer) {
+ $rootScope.IsTextAlreadySave = true;
+
+ var _rectLayerOnSave = layer.name;
+ var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
+ var TextAreaRectName = "TextArea_";
+ var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]);
+ $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated });
+ $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
+ var _rectLayerOnSaveSplitInt;
+ //if (_rectLayerOnSaveSplit[1] >= 3)
+ // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2);
+ //else
+ // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]);
+
+ _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]);
+ var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1;
+ $("#text_area").val(b);
+ var fontStyleProp = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle;
+ var fontWeightProp = fontStyleProp.split(" ");
+
+ $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize);
+ $("#text_area").css("font-weight", fontWeightProp[0]);
+ $("#text_area").css("font-style", fontWeightProp[1]);
+ $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align);
+ $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor);
+ $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily);
+ $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration);
+
+
+
+
+ //adding text text decoration active class in text edit pop-up
+
+ if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration == "underline") {
+
+ $("#text-underline").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ else {
+
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+
+
+ //adding text font weight active class in text edit pop-up
+
+ if (fontWeightProp[0] == 700) {
+
+
+
+ $("#text-bold").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ else
+
+ {
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text font style active class in text edit pop-up
+
+ if (fontWeightProp[1] == "italic") {
+
+
+ $("#text-italic").addClass("ActiveFormattingButtonClass");
+ }
+ else
+
+ {
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+
+
+ }
+
+
+
+ //adding text alignment active class in text edit pop-up
+
+ if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "left") {
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+
+ $("#text-left").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ else if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "right") {
+
+
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").addClass("ActiveFormattingButtonClass");
+
+
+
+ }
+
+ else if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "center") {
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").addClass("ActiveFormattingButtonClass");
+
+
+
+ }
+
+
+ _rectLayerOnSaveSplitInt = ''; b = '';
+ $("#annotationTextModal").modal("toggle");
+ },
+ mouseout: function (layer) {
+ $rootScope.canvasLayerNameCollection = [];
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: 'pink',
+ strokeStyle: 'yellow',
+ strokeWidth: 0,
+ width: 0, height: 0,
+ cornerRadius: 0
+ }
+ }).drawLayers();
+ },
+ mouseover: function (layer) {
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3
+ }
+ }).drawLayers();
+
+ }
+ });
+ $("#text_area").val('');
+ $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
+
+
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass");
+
+
+ }
+
+ // this part will work second time when save button will be clicked
+ else {
+ // getting textarea style properties
+ var _modifiedText = $("#text_area").val();
+ var _modifiedFontSize = $("#text_area").css("font-size");
+ var _modifiedFontWeight = $("#text_area").css("font-weight");
+ var _modifiedFontStyle = $("#text_area").css("font-style");
+ var _modifiedTextAlign = $("#text_area").css("text-align");
+ var _modifiedFontColor = $("#text_area").css("color");
+ var _modifiedFontFamily = $("#text_area").css("font-family");
+ var _modifiedFontDecoration = $("#text_area").css("text-decoration");
+
+ // deleting previous textarea
+ $("#canvas").removeLayer($rootScope.modifySavedText[0].RectText).drawLayers();
+ $("#canvas").removeLayer($rootScope.modifySavedText[0].TextName).drawLayers();
+ $rootScope.resetTextRectSave = $rootScope.ObjectIndexSave++;
+ $rootScope.resetTextSave = $rootScope.ObjectIndexSave++;
+
+ // generating new text area
+ $('#canvas').drawText({
+ layer: true,
+ draggable: true,
+ name: 'TextAreaAfterEdit_' + $rootScope.resetTextSave,
+ groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
+ dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
+ fillStyle: _modifiedFontColor,
+ fontStyle: _modifiedFontWeight + " " + _modifiedFontStyle,
+ fontSize: _modifiedFontSize,
+ fontFamily: _modifiedFontFamily,
+ align: _modifiedTextAlign,
+ strokeWidth: 0,
+ text: _modifiedText,
+ x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
+ maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
+ maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height
+
+ })
+ // Draw rect as wide as the text
+ .drawRect({
+ name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave,
+ layer: true,
+ draggable: true,
+ groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
+ dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave],
+ opacity: $rootScope.shapestyleOpacity,
+ strokeStyle: $rootScope.shapestyleborderColor,
+ strokeWidth: $rootScope.shapestyleborderWidth,
+ x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
+ width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
+ height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
+ click: function (layer) {
+ $rootScope.shapeTypeText = "textAreaRect";
+ var layerNameSplit = layer.name;
+ var splitedName = layerNameSplit.split("_");
+ var textValName = "TextAreaAfterEdit_";
+ var concatinateResult = textValName.concat(splitedName[1]);
+ $rootScope.canvasLayerNameCollection = [];
+ $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
+
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3
+ }
+ }).drawLayers();
+
+ },
+ dblclick: function (layer) {
+
+ $rootScope.IsTextAlreadySave = true;
+ var _rectLayerOnSave = layer.name;
+ var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
+ var RectNameAfterEdit = "TextAreaAfterEdit_";
+ var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]);
+ $rootScope.modifySavedText.push({ TextName: layer.name, RectText: RectNameAfterEditResult });
+ $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
+ $("#text_area").val(_modifiedText);
+ $("#text_area").css("font-size", _modifiedFontSize);
+ $("#text_area").css("font-weight", _modifiedFontWeight);
+ $("#text_area").css("font-style", _modifiedFontStyle);
+ $("#text_area").css("text-align", _modifiedTextAlign);
+ $("#text_area").css("color", _modifiedFontColor);
+ $("#text_area").css("font-family", _modifiedFontFamily);
+ $("#text_area").css("text-decoration", _modifiedFontDecoration);
+
+
+
+ //adding text text decoration active class in text edit pop-up
+ if (_modifiedFontDecoration == "underline") {
+ $("#text-underline").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+ }
+
+ //adding text font weight active class in text edit pop-up
+ if (_modifiedFontWeight == 700) {
+
+ $("#text-bold").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text font style active class in text edit pop-up
+ if (_modifiedFontStyle == "italic") {
+
+ $("#text-italic").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text alignment active class in text edit pop-up
+ if (_modifiedTextAlign == "left") {
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+ $("#text-left").addClass("ActiveFormattingButtonClass");
+ }
+ else if (_modifiedTextAlign == "right") {
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+ $("#text-right").addClass("ActiveFormattingButtonClass");
+
+ }
+ else if (_modifiedTextAlign == "center") {
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+ $("#text-center").addClass("ActiveFormattingButtonClass");
+
+ }
+
+
+
+
+
+ $("#annotationTextModal").modal("toggle");
+ },
+ mouseout: function (layer) {
+ $rootScope.canvasLayerNameCollection = [];
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: 'pink',
+ strokeStyle: 'yellow',
+ strokeWidth: 0,
+ width: 0, height: 0,
+ cornerRadius: 0
+ }
+ }).drawLayers();
+ },
+ mouseover: function (layer) {
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3
+ }
+ }).drawLayers();
+
+ }
+ });
$rootScope.modifySavedText = [];
- }
+ }
}
-
+
// deleting text area on close button
$rootScope.closeModal = function () {
- $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers();
- $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
-
- }
+ $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers();
+ $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
+
+ }
function OnPaintCanvasMouseMove(event) {
@@ -6789,7 +7167,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$rootScope.FreeStylePaint = function (e) {
-
+
}
$scope.OnPaintBrushCanvasMouseDown = function (event) {
@@ -6797,22 +7175,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
case "FreeStylePaint":
-
- // $('#canvasPaint').sketch();
- // $('#canvasPaint').sketch({ defaultSize: 1 });
- // if ($("#amount-2").val() == '') {
- // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
- // $('#canvasPaint').sketch();
- // }
- // else {
- // // var a = $("#amount-2").val();
- //// $scope.shapesize = parseInt(a);
- // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize });
- // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+ // $('#canvasPaint').sketch();
+ // $('#canvasPaint').sketch({ defaultSize: 1 });
+ // if ($("#amount-2").val() == '') {
+ // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+ // $('#canvasPaint').sketch();
+ // }
+ // else {
- // }
+ // // var a = $("#amount-2").val();
+ //// $scope.shapesize = parseInt(a);
+ // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize });
+ // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+
+ // }
break;
@@ -6830,7 +7208,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// case "FreeStylePaint":
-
+
// if ($("#amount-2").val() == '')
// {
// $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
@@ -6856,9 +7234,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$(document).keydown(function (event) {
-
+ // predefined function for detecting keyboard key
if (event.which == 46) {
-
+
if ($rootScope.shapeTypePin == "Pin") {
@@ -6926,7 +7304,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//NIKITA
- $scope.isHighlightBodyByBodySystem = true;
+ $rootScope.isHighlightBodyByBodySystem = true;
$scope.systemMatchedTermList = new jinqJs()
.from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
.where('_SystemNumber == ' + event.currentTarget.id)
@@ -6938,14 +7316,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
console.log('highLightBody from HighlightBodyByBodySystem')
$scope.highLightBody();
}
- //now highlight the selected body system in whole body
+ else {
+ //This else is when user seraced anything then change the view and clicked on highlight options
+ //in this case body is already highlihted(gray) so no need to
+ if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ if (($scope.isAlreadyHighlighted == true && $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined && $scope.systemMatchedTermList.length > 0)) {
+
+ $scope.isLoading = true;
+
+ $('#spinner').css('visibility', 'visible');
+ $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
+ }
+ }
+ }
//$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
//NIKITA
- // $scope.isHighlightBodyByBodySystem = true;
+ // $rootScope.isHighlightBodyByBodySystem = true;
//if (systemMatchedTermList != null || systemMatchedTermList != undefined) {
@@ -7165,12 +7567,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.ShowSearch = function () {
console.log('ShowSearch is called');
+ //this check is for log only because we are writing length so need to check if its not null or undefined
+ if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined)
+ console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length)
$timeout(function () {
- $scope.IsSearchVisible = true;
-
- document.getElementById("termlistfilter").style.display = "block";
- }, 1000);
+ if (($scope.VocabTermTxt!=null|| $scope.VocabTermTxt!=undefined) && ($scope.VocabTermTxt.length > 0)) {
+ $scope.IsSearchVisible = true;
+ document.getElementById("termlistfilter").style.display = "block";
+ }
+ else {
+ $scope.loadSearchDataForBodyView();
+ if ($scope.VocabTermTxt.length > 0) {
+ $scope.ShowSearch();
+ }
+ }
+ }, 500);
//$scope.IsSearchVisible = true;
@@ -7242,7 +7654,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#canvasDiv").scrollTop(scrolly);
$("#canvasDiv").scrollLeft(scrollx);
- if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
+ if (($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
$timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
}
@@ -7278,7 +7690,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
$('#spinner').css('visibility', 'visible');
- console.log('listManagerEvent')
+ console.log('listManagerEvent');
+
+
+
if ($rootScope.islistManagerEventAlredayDispachted == true) {
@@ -7368,17 +7783,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
var $el = $('').appendTo('#termList')
$compile($el)($scope);
-
+
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
}
var termsTotal = '' + $scope.VocabTermTxt.length + ' Structures';
$("#totalTerms").empty();
$('#totalTerms').append(termsTotal);
-
+
}
- }
+ }
$scope.HighlightBodyOnListManagerSelection = function (event) {
@@ -7402,6 +7817,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
+
+ $rootScope.isHighlightBodyByBodySystem = false;
+
//1.
$rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value;
console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber)
@@ -7418,83 +7836,85 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
- var internalLayerNumberList = [];
- for (var i = 0; i < $scope.TermList.length; i++) {
- var layerNumber = $scope.TermList[i]._InternalLayerNumber
+ if (($scope.TermList != null || $scope.TermList != undefined) && $scope.TermList.length > 0) {
- internalLayerNumberList[i] = parseInt(layerNumber);
- }
+ var internalLayerNumberList = [];
+ for (var i = 0; i < $scope.TermList.length; i++) {
+ var layerNumber = $scope.TermList[i]._InternalLayerNumber
- internalLayerNumberList.sort(function (a, b) { return a - b })
- var internalLayerNumber = internalLayerNumberList[0]//.replace('00', '');
+ internalLayerNumberList[i] = parseInt(layerNumber);
+ }
- //3. get layer number
- if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) {
+ internalLayerNumberList.sort(function (a, b) { return a - b })
+ var internalLayerNumber = internalLayerNumberList[0]//.replace('00', '');
- internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER;
- }
+ //3. get layer number
+ if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) {
- var layerNumber;
- var matchedLayerNumber = new jinqJs()
- .from($rootScope.BodyLayerData.Layers.DataLayer)
- .where("_lni == " + internalLayerNumber)
- .select('_LayerNumber');
+ internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER;
+ }
- if (matchedLayerNumber == null || matchedLayerNumber.length == 0) {
- layerNumber = 0;
- }
- else {
- layerNumber = matchedLayerNumber[0]._LayerNumber
- }
+ var layerNumber;
+ var matchedLayerNumber = new jinqJs()
+ .from($rootScope.BodyLayerData.Layers.DataLayer)
+ .where("_lni == " + internalLayerNumber)
+ .select('_LayerNumber');
- if (layerNumber == 0) {
- layerNumber = $rootScope.totalLayers;
- }
- else {
- layerNumber = parseInt(layerNumber) - 1;
- }
+ if (matchedLayerNumber == null || matchedLayerNumber.length == 0) {
+ layerNumber = 0;
+ }
+ else {
+ layerNumber = matchedLayerNumber[0]._LayerNumber
+ }
- $scope.layerNumber = layerNumber;
+ if (layerNumber == 0) {
+ layerNumber = $rootScope.totalLayers;
+ }
+ else {
+ layerNumber = parseInt(layerNumber) - 1;
+ }
- //4.get scroll position
- if ($rootScope.actualTermNumber != DA[0].SKIN_TERM_ID) {
+ $scope.layerNumber = layerNumber;
- $scope.termCoordinate = $scope.getTermCoordinate($rootScope.actualTermNumber);
+ //4.get scroll position
+ if ($rootScope.actualTermNumber != DA[0].SKIN_TERM_ID) {
- }
+ $scope.termCoordinate = $scope.getTermCoordinate($rootScope.actualTermNumber);
- //5.
- $scope.matchdedDataOnLayer = new jinqJs()
- .from($rootScope.TermNumberData.TermData.Term)
- .where('_InternalLayerNumber == ' + internalLayerNumber)
- .select();
+ }
- if ($scope.matchdedDataOnLayer != null || $scope.matchdedDataOnLayer != undefined) {
+ //5.
+ $scope.matchdedDataOnLayer = new jinqJs()
+ .from($rootScope.TermNumberData.TermData.Term)
+ .where('_InternalLayerNumber == ' + internalLayerNumber)
+ .select();
- //6.
- var matchedDataonActualTerm = new jinqJs()
- .from($scope.matchdedDataOnLayer)
- .where('_ActualTermNumber == ' + $scope.actualTermNumber)
- .select('_TermNumber');
+ if ($scope.matchdedDataOnLayer != null || $scope.matchdedDataOnLayer != undefined) {
- if (matchedDataonActualTerm != null || matchedDataonActualTerm != undefined) {
+ //6.
+ var matchedDataonActualTerm = new jinqJs()
+ .from($scope.matchdedDataOnLayer)
+ .where('_ActualTermNumber == ' + $scope.actualTermNumber)
+ .select('_TermNumber');
- var termNo = matchedDataonActualTerm[0]._TermNumber.toString();
+ if (matchedDataonActualTerm != null || matchedDataonActualTerm != undefined) {
- //7.get termList
- $scope.fullTermlist = [];
- $scope.AllTerms = [];
+ var termNo = matchedDataonActualTerm[0]._TermNumber.toString();
- if (termNo != DA[0].figLeafTermId) {
+ //7.get termList
+ $scope.fullTermlist = [];
+ $scope.AllTerms = [];
- $scope.getChildTermList(termNo);
- // $timeout(function () { $scope.getSiblings(termNo) }, 50);
- $scope.getSiblings(termNo)
- }
+ if (termNo != DA[0].figLeafTermId) {
+
+ $scope.getChildTermList(termNo);
+ // $timeout(function () { $scope.getSiblings(termNo) }, 50);
+ $scope.getSiblings(termNo)
+ }
+ }
}
}
-
$('#txtlayerNumber').val((parseInt($scope.layerNumber)));
$('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));
@@ -7512,6 +7932,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//redraw body of respective layer
$scope.CalculateImageCordinates($rootScope.viewOrientationId)
}, 500);
+
}
$scope.getChildTermList = function (termNo) {
@@ -7581,7 +8002,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
-
+
$scope.aligneCanvasWithTerm = function () {
console.log('aligneCanvasWithTerm')
var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
@@ -7596,7 +8017,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var canvasRight = canvasX + canvasWidth
if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom) {
-
+
newX = newX - canvasWidth / 2;
newY = newY - canvasHeight / 2;
@@ -7625,7 +8046,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
-
+
}
@@ -7744,13 +8165,167 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.LayerChangeBasedOnKeyPressed = function (e) {
-
- if(e.keyCode==13)
- {
- $scope.LayerChange();
+
+ if (e.keyCode == 13) {
+ $scope.LayerChange();
}
-
+
+ // 'x' button is displaying inside the input box in IE browser.
+ if (e.which == 38) {
+
+
+ var layerInputVal = $("#txtlayerNumber").val();
+ if (layerInputVal != $rootScope.totalLayers) {
+ var layerInputValInc = parseInt(layerInputVal) + 1;
+ $scope.layerNumber = parseInt(layerInputValInc);
+ $("#txtlayerNumber").val($scope.layerNumber);
+ }
+
+
+ }
+
+ // 'x' button is displaying inside the input box in IE browser.
+ if (e.which == 40) {
+ var layerInputVal = $("#txtlayerNumber").val();
+ if (layerInputVal > 0) {
+ var layerInputValDec = parseInt(layerInputVal) - 1;
+ $scope.layerNumber = parseInt(layerInputValDec);
+ $("#txtlayerNumber").val($scope.layerNumber);
+ }
+ }
+
+
}
+
+
+
+
+
}]
-);
\ No newline at end of file
+);
+
+
+function OnGenderChange(event) {
+
+ console.log('gender chnaged is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.OnGenderChange(event);
+ });
+}
+
+function OnViewChange(event) {
+ console.log('OnViewChange chnaged is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.OnViewChange(event);
+ });
+}
+
+function OnBodySystemSelection(event) {
+ console.log('OnBodySystem chnaged is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.HighlightBodyByBodySystem(event);
+ });
+}
+
+function enableShowHideStructureBox() {
+ console.log('OnBodySystem chnaged is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableShowHideStructureBox();
+ });
+}
+
+function OnSearch() {
+ console.log('Show Search is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.ShowSearch();
+ });
+}
+function selectTerm(event) {
+ console.log('selectTerm is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.jumpToTerm(event);
+ });
+}
+function HighlightBodyOnListManager(event) {
+ console.log('HighlightBodyOnListManager is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.HighlightBodyOnListManagerSelection(event);
+ });
+}
+
+function refreshTermListOnSystem(event) {
+ console.log('refreshTermListOnSystem is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.refreshTermListOnSystemSelection(event);
+ });
+}
+
+function OnEnableExtract()
+{
+ console.log('OnEnableExtract is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableExtract('true');
+ });
+}
+
+function onTboxCreation()
+{
+ console.log('OnEnableExtract is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.createTransparencyBox('true');
+ });
+}
+
+function onTboxClose()
+{
+ console.log('onTboxClose is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.CloseTransparencyBox();
+ });
+}
+
+function OnEnableNormalMode()
+{
+ console.log('OnEnableNormalMode is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableNormalMode();
+ });
+}
+
+function OnEnableHighlight() {
+ console.log('OnEnableHighlight is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableHighlight();
+ });
+}
+
+function OnIdentityClick() {
+ console.log('OnIdentityClick is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.IdentityClick();
+ });
+}
+
+function OnZoom()
+{
+ console.log('OnZoom is called outside ');
+ var scope = angular.element(document.getElementById("daView")).scope();
+ scope.$apply(function () {
+ scope.enableZoom();
+ });
+}
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index ae79191..a74e3b4 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -90,15 +90,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
}
}
- $rootScope.DrawLine = function () {
+ // $rootScope.DrawLine = function () {
//$rootScope.isIdetifyClicked = false;
//$rootScope.isDrawingToolSelected = true;
//$rootScope.isLineDrawSelecyed = true;
- $rootScope.shapeType = "Line";
+ // $rootScope.shapeType = "Line";
// alert($rootScope.shapeType);
- }
+ // }
$rootScope.ClearIframe = function () {
if ($('#daImagePanel') != null)
@@ -118,6 +118,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
//annotation tool custom events
$rootScope.ShowAnnotationWindow = function () {
+ //7904
+ $("#annotationToolBarOptions").addClass("active");
+ $("#annotationButton").addClass("active");
+
$rootScope.isAnnotationWindowOpen = true;
$(".annotationTollbar").css("display", "block");
$rootScope.$broadcast('annotationToolEvent', true);
@@ -126,8 +130,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
}
$rootScope.CloseAnnotationTool = function () {
- console.log('close')
+ console.log('close');
$('.btnCursor').removeClass('activebtncolor');
+ $("#annotationButton").removeClass("active");
+ $("#annotationToolBarOptions").removeClass("active");
+
+
$(".annotationTollbar").css("display", "none");
$rootScope.isAnnotationWindowClose = true;
$("#canvasPaint").css("display", "none");
@@ -167,21 +175,28 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
//----Annotation Toolbar: Jcanvas-----
- $rootScope.DrawLine = function (e) {
+ $rootScope.DrLine = function (e) {
$rootScope.setListManagerZindex = true;
+ $("#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");
+ $(".btn-annotation").removeClass("activebtncolor");
+ $(".btn-annotation-line").addClass("activebtncolor");
}
- $rootScope.DrawPin = function (e) {
+ $rootScope.DrPin = function (e) {
+ $("#canvasPaint").css("display", "block");
+ $("#canvas").css("display", "block");
+
+ $rootScope.switchCanvas();
$rootScope.switchCanvas();
$rootScope.setListManagerZindex = true;
$rootScope.shapeType = "Pin";
@@ -348,6 +363,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
// $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
+ //Edit Shape Style popup should open at it's default position
+ $("#modeleditstyle").css({ "left": "0", "right": "0", "margin": "0 auto", "top":"70px"});
}
@@ -364,10 +381,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
};
}
+
+ $rootScope.enableEditShapeTooltip = function () {
+
+ $("#edit-block").addClass("custom-tooltip-annotation");
+ $(".custom-tooltip-annotation").css('display', 'block');
+
+ }
+
+ $rootScope.disableEditShapeTooltip = function () {
+
+ $(".custom-tooltip-annotation").css('display', 'none');
+ $("#edit-block").removeClass("custom-tooltip-annotation");
+
+
+ }
+
+
$rootScope.disableAnnotationToolBar = function () {
document.getElementById('modelbackground').style.display = "none";
document.getElementById('modeleditstyle').style.display = "none";
+ //Edit Shape Style popup should open at it's default position
+ $("#modeleditstyle").css({"left":"0", "right":"0", "margin":"0 auto", "top":"70px"});
+
}
@@ -646,7 +683,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
//localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty);
//4.
- $rootScope.reloadChildController();
+ //$rootScope.reloadChildController();
+
+ var len = $rootScope.openModules.length;
+ if (len > 0) {
+ $rootScope.reloadChildController();
+ }
+ else
+ {
+ $('#modal-settings').modal('hide');
+ }
};
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/3dA/3d-anatomy-details.html b/400-SOURCECODE/AIAHTML5.Web/app/views/3dA/3d-anatomy-details.html
index ca7d344..a488e40 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/3dA/3d-anatomy-details.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/3dA/3d-anatomy-details.html
@@ -1,23 +1,25 @@
-
-
-
-
-
-
-
{{bodySystemTitle}}
-
-
-
+
+
+
+
+
+
+
+
{{bodySystemTitle}}
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
index 356a62b..299a0a2 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
@@ -57,7 +57,7 @@
-
+
{{item._Title}}
@@ -73,7 +73,7 @@
-
+
{{item._Title}}
@@ -87,6 +87,9 @@
{{item._MedicalSpecialty}}
+
+
No animation found for the selected search criteria!