diff --git a/400-SOURCECODE/AIAHTML5.Web/Web.config b/400-SOURCECODE/AIAHTML5.Web/Web.config
index 81b5072..58cc88d 100644
--- a/400-SOURCECODE/AIAHTML5.Web/Web.config
+++ b/400-SOURCECODE/AIAHTML5.Web/Web.config
@@ -18,7 +18,7 @@
-
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 210e616..9a868fa 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1,4 +1,5 @@
-'use strict';
+
+'use strict';
AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService",
function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) {
@@ -368,7 +369,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($rootScope.openViews.length > 0) {
openViews = new jinqJs()
.from($rootScope.openViews)
- .where("BodyViewId==" + currentBodyViewId)
+ .where("BodyViewId == " + currentBodyViewId)
.select();
}
}
@@ -380,7 +381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (openViews != null && openViews != undefined) {
angular.forEach(openViews, function (value, key) {
- if (value.body - views == tittle) {
+ if (value.body-views == tittle) {
tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
$rootScope.currentActiveViewTitle = tittle;
localStorage.setItem("currentViewTitle", tittle);
@@ -717,10 +718,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.ColoredImageSRC = [];
}
- if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined)
- {
- angular.forEach($scope.bodyRegionCoordinates, function (value, key)
- {
+ if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) {
+ angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
if (value._HaveMirrorImage == 'Y') {
@@ -733,7 +732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var src = $scope.GetImageSource(value._BodyRegionId);
$scope.imageSource = src;
-
+
//2.Draw mirror image
$scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
// debugger;
@@ -756,7 +755,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//0. Scaling as per default zoom
var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0);
-
+
//1.Draw body region which have mirror image
$scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
$scope.BodyRegionCordinatesData.push(
@@ -772,7 +771,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
else {
-
+
//0.Scaling as per default zoom
var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
@@ -786,7 +785,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.imageSource = src;
}
-
//2.Draw body region which don't have mirror image
$scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
@@ -812,6 +810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var gender;
if (localStorage.getItem("genderId") == 'Female') {
gender = 'F';
+
}
else {
gender = 'M';
@@ -992,6 +991,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
+
$scope.GetImageSource = function (bodyRegionId) {
// debugger;
var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
@@ -1146,8 +1146,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)
- {
+ if ($scope.isLayerChange == true) {
$scope.isLayerChange = false;
}
@@ -1428,7 +1427,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
var imgCanvas = document.createElement('canvas');
-
+
imgCanvas.height = h;
imgCanvas.width = w;
imgCanvas.setAttribute("data-IsMirrored", "N")
@@ -1814,7 +1813,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
loopLength = 1;
}
-
+
if (loopLength !== 0) {
for (var x = 0; x < loopLength; x++) {
if ($rootScope.MaskCanvasData[x] != null || $rootScope.MaskCanvasData[x] != undefined) {
@@ -1918,7 +1917,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
grayCanvasContext.putImageData(imgData, 0, 0);
}
-
+
if ($rootScope.multiAnnotationIsON == true) {
//debugger;
if (canvasId.match('_MR'))
@@ -1961,6 +1960,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.HighlightBodyByTermList = function (TermList) {
+ //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) {
+ // $rootScope.updatedGrayMRDataList = null;
+ // $rootScope.updatedGrayMRDataList = [];
+ //}
+ //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) {
+ // $rootScope.updatedGrayDataList = null;
+ // $rootScope.updatedGrayDataList = [];
+ //}
console.log('HighlightBodyByTermList is called');
@@ -2051,7 +2058,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($scope.isLayerChange == true) {
if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) {
grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1];
-
+
}
} else {
@@ -2135,11 +2142,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (canvasId.match('_MR')) {
$rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData;
+ //alert('HighlightBodyByTermList, is mutiAnnotation on= ' + $rootScope.multiAnnotationIsON);
+
+ //$rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData;
}
else
$rootScope.updatedGrayDataList[bodyRegionId - 1] = updatedData;
-
+ //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId });
+
console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length)
if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) {
@@ -2184,8 +2195,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
-
-
$scope.createTermListByPreviousTermsAndHighlight = function () {
@@ -2209,14 +2218,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
console.log('createTermListByPreviousTermsAndHighlight is called');
- if ((multiTermList != undefined || multiTermList!=null) && multiTermList.length>0) {
+ if ((multiTermList != undefined || multiTermList != null) && multiTermList.length > 0) {
$timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50);
}
}
-
$scope.GetRGBColor = function (maskCanvasContext, actulalX, actualY, x, y) {
var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1);
@@ -2320,6 +2328,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//layer change function
$scope.LayerChange = function () {
+ //remove annotation
+
+
+
+
$scope.isLayerChange = true;
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -2575,7 +2588,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else {
console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length)
}
-
+ if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){
if ($scope.longestAnnotation.length <= 10) {
@@ -2634,6 +2647,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
+
+ }
var Globe = [];
Globe.push({ currentX: x, currentY: y });
@@ -3767,41 +3782,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- // niki 3june
- //var txtTransparencyChange = document.getElementById("txtTransparencyChange");
- ////for first time, the transparency should be 50%
- //if ($scope.isTboxDrwan) {
-
- // if (txtTransparencyChange != null)
- // txtTransparencyChange.value = 50;
-
- // $scope.isTboxDrwan = false;
-
- //}
-
- //check if transparency is activated
+ //check if transparency is activated
var transNumber = $scope.transNumber;//txtTransparencyChange.value;
// debugger;
- //this changes the transparency when transparency is already activated(on scale the value is >0) and user resizes or chage the layer
+ //this changes the transparency when transparency is already activated and user resizes or chage the layer
var imageD = tempCtx.getImageData(0, 0, Width, Height);
- if (transNumber > 0) {
- // debugger;
-
-
- // tempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;
+
var tempCtx = document.getElementById(tempCanvasID).getContext('2d');
- // var image = ctx.getImageData(0, 0, scope.transparencyCanvasWidth, scope.transparencyCanvasHeight);
-
-
//keep the original image on temp canavs to use it in changing transparency
- // if (scope.isResized == true || scope.isLayerChanged) {
- //debugger;
-
+
if (document.getElementById('tempCanvas') != null) {
var contx = document.getElementById('tempCanvas').getContext('2d');
var tbTempCanvas = document.getElementById(tempCanvasID)
@@ -3836,8 +3830,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
tempCtx.putImageData(imageD, 0, 0);
- }
-
+
var ctx = transparencyCanvas.getContext('2d');
@@ -4494,6 +4487,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.enableZoom = function () {
+ //remove speech bubble
+ $('#sppeachBubble').css('display', 'none');
+
+ $("#dot").css("display", "none");
+
$scope.terminateCurrentlyRunningWPs();
if ($scope.isTransparencyActivated) {
@@ -4542,54 +4540,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.flushCanvas = function () {
- if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
- angular.forEach($scope.ColoredImageSRC, function (value, key) {
-
- var id;
- var maskId;
- if (value.haveMirror == 'true') {
- id = 'imageCanvas' + value.bodyRegionId + '_MR';
- maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
- }
- else {
- id = 'imageCanvas' + value.bodyRegionId;
- maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
- }
-
- 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 modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
- for (var i = 0; i < modestyCanvases.length; i++) {
- modestyCanvases[i].remove();
- }
- });
- }
+ //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
+ // angular.forEach($scope.ColoredImageSRC, function (value, key) {
- //for (var i = 1; i < 7; i++) {
-
- // var id;
- // var maskId;
-
- // id = 'imageCanvas' + i;
- // maskId = 'imageCanvas' + i + '_mci';
+ // var id;
+ // var maskId;
+ // if (value.haveMirror == 'true') {
+ // id = 'imageCanvas' + value.bodyRegionId + '_MR';
+ // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
+ // }
+ // else {
+ // id = 'imageCanvas' + value.bodyRegionId;
+ // maskId = 'imageCanvas' + value.bodyRegionId + '_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);
+ // }
// if (i == 4 || i == 5 || i == 6) {
// id = 'imageCanvas' + i + '_MR';
// maskId = 'imageCanvas' + i + '_MR_mci';
@@ -4603,6 +4577,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// document.getElementById('canvasDiv').removeChild(maskcanvas);
// }
+ // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
+ // for (var i = 0; i < modestyCanvases.length; i++) {
+ // modestyCanvases[i].remove();
+ // }
+ // });
// //remove modesty canavs
// var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
// if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
@@ -4611,6 +4590,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// }
// }
//}
+
+ for (var i = 1; i < 7; i++) {
+
+ var id;
+ var maskId;
+
+ id = 'imageCanvas' + i;
+ maskId = 'imageCanvas' + i + '_mci';
+
+ 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);
+
+ 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 maskcanvas = document.getElementById(maskId);
+ if (maskcanvas != null || maskcanvas != undefined)
+ document.getElementById('canvasDiv').removeChild(maskcanvas);
+ }
+
+ //remove modesty canavs
+ var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
+ if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
+ for (var j = 0; j < modestyCanvases.length; j++) {
+ modestyCanvases[j].remove();
+ }
+ }
+ }
}
$scope.terminateCurrentlyRunningWPs = function () {
@@ -4750,7 +4767,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.highLightBody = function () {
- // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId);
+ console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length);
$scope.terminateCurrentlyRunningWPs();
@@ -4773,13 +4790,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.doHighlightOrExtract = false;
}
- console.log('$scope.doHighlightOrExtract= ' + $scope.doHighlightOrExtract)
+
if ($scope.doHighlightOrExtract == true) {
if ($rootScope.isHighLight == true) {
$scope.grayedBR = [];
angular.forEach($scope.ColoredImageSRC, function (value, key) {
+ console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length)
var id;
if (value.haveMirror == 'true') {
id = 'imageCanvas' + value.bodyRegionId + '_MR';
@@ -4819,7 +4837,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
img.src = dataURL;
img.onload = function () {
-
+ console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= '
+ + value.bodyRegionId)
var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
DAData.draw(img);
@@ -4837,26 +4856,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
-
+
context_gray.putImageData(DAData.data, 0, 0)
-
- // to resolve lateral arm black issue in highlight mode
- if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) {
-
+ //NIKI- to resolve lateral arm black issue in highlight mode
+
+ if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) {
+
var imgData = context_gray.getImageData(0, 0, width, ht);
var data = imgData.data;
- var c=0;
+ 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;
}
-
+
}
context_gray.putImageData(imgData, 0, 0);
}
-
- //
+
//push BRID into array
$scope.grayedBR.push({ 'BRID': value.bodyRegionId });
@@ -4908,18 +4926,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($scope.isEligibleForHighlightBodyByTermList == true) {
//DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
- if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
+ // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
$scope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
- }
+ //}
if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
+ $scope.isLoading = true;
+
+ $('#spinner').css('visibility', 'visible');
$timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
}
- else if ($scope.isHighlightByListManager == true) {
+ else if ($rootScope.isListManagerSelected == true) {
+ // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
$timeout(function () {
$scope.HighlightBodyByTermList($scope.AllTerms)
@@ -4929,7 +4951,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
$scope.createTermListByPreviousTermsAndHighlight();
}
-
}
@@ -4942,12 +4963,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($rootScope.isExtract == true) {
if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
- console.log('HighlightBodyOnExtract')
+
$timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
}
}
//else {
- // console.log('INSIDE ELSE. $scope.grayedBR.length= ' + $scope.grayedBR.length)
// // 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) {
@@ -4966,14 +4986,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// }
- // console.log('INSIDE ELSE $scope.isEligibleForHighlightBodyByTermList = ' + $scope.isEligibleForHighlightBodyByTermList)
+
// //
//}
})
-
- //if ($scope.isEligibleForHighlightBodyByTermList == true) {
- // console.log('CREATE multiTermList')
+ //if ($scope.isEligibleForHighlightBodyByTermList == true) {
// if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
// var multiTermList = [];
@@ -5016,6 +5034,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var imageCanvas = document.getElementById(id);
+ //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
+ //var coloredCanvas = document.getElementById(coloredCanvasID);
var width = value.Width;
var ht = value.Height;
@@ -5326,6 +5346,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
+
+ if ($rootScope.openViews.length > 0) {
+ $rootScope.openViews.splice($rootScope.openViews.length - 1);
+ }
+
$rootScope.isViewChange = true;
$scope.layerNumber = 0;
// debugger;
@@ -5465,7 +5490,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//Reload DA controller Body View after setting Change
$scope.$on('reloadDABodyViewEvent', function (event, data) {
//console.log('reloadDABodyViewEvent');
-
+ $scope.layerNumber = parseInt($('#txtlayerNumber').val());
$scope.ReloadBodyViewId = data.reloadDABodyViewId;
// $scope.layerNumber = 0;
// debugger;
@@ -5491,38 +5516,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.skinTone = $rootScope.globalSetting.ethnicity;
- var navdtlOrient = new jinqJs()
- .from($scope.NavigatorData.Navigtor.ViewOrientation)
- .where("_ViewOrientationId == " + $scope.voId)
- .select();
- if (navdtlOrient != null || navdtlOrient != undefined) {
+ if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) {
+ var navdtlOrient = new jinqJs()
+ .from($scope.NavigatorData.Navigtor.ViewOrientation)
+ .where("_ViewOrientationId == " + $scope.voId)
+ .select();
- var navOrientationdata = new jinqJs()
- .from(navdtlOrient[0].ImageInfo)
- .where("_Ethnicity == " + $scope.skinTone)
- .select();
- if (navOrientationdata != null || navOrientationdata != undefined) {
+ if (navdtlOrient != null || navdtlOrient != undefined) {
- $scope.navigatorImage = navOrientationdata;
+ var navOrientationdata = new jinqJs()
+ .from(navdtlOrient[0].ImageInfo)
+ .where("_Ethnicity == " + $scope.skinTone)
+ .select();
+ if (navOrientationdata != null || navOrientationdata != undefined) {
- var navImageModesty;
+ $scope.navigatorImage = navOrientationdata;
- angular.forEach($scope.navigatorImage, function (value, key) {
- if (value._HaveModesty === $rootScope.globalSetting.modesty) {
- navImageModesty = value._ImageName;
- }
- })
- if (typeof (navImageModesty) === "undefined" || navImageModesty === null) {
- navImageModesty = $scope.navigatorImage[0]._ImageName;
+ var navImageModesty;
- }
+ angular.forEach($scope.navigatorImage, function (value, key) {
+ if (value._HaveModesty === $rootScope.globalSetting.modesty) {
+ navImageModesty = value._ImageName;
+ }
+ })
+ if (typeof (navImageModesty) === "undefined" || navImageModesty === null) {
- $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
+ navImageModesty = $scope.navigatorImage[0]._ImageName;
+
+ }
+
+ $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
+ }
}
+
}
+
}
//Annotation tool event lsitener
@@ -6129,7 +6160,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- //-- TextArea functionality of Annotation toolbar
+ //-- TextArea functionality of Annotation toolbar
$rootScope.fontSizes;
$rootScope.fontWeight;
@@ -6140,8 +6171,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.textArea;
$rootScope.fontFamily;
$rootScope.saveText = function () {
-
- $rootScope.fontSizes = $("#text_area").css("font-size");
+
+ $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");
@@ -6155,7 +6186,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('#canvas').drawText({
layer: true,
draggable: true,
- name:'TextArea_'+ $rootScope.resetText,
+ name: 'TextArea_' + $rootScope.resetText,
groups: ['TextArea_' + $rootScope.resetText],
dragGroups: ['TextArea_' + $rootScope.resetText],
fillStyle: $rootScope.fontColor,
@@ -6168,16 +6199,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
x: $scope.offsetX1, y: $scope.offsetY1,
maxWidth: $scope.x - $scope.offsetX1,
maxHeight: $scope.y - $scope.offsetY1,
-
+
click: function (layer) {
-
-
+
+
},
change: function (layer, props) {
}
-
+
})
// Draw rect as wide as the text
.drawRect({
@@ -6198,19 +6229,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
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: {
@@ -6225,7 +6256,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
},
mouseout: function (layer) {
-
+
$rootScope.canvasLayerNameCollection = [];
$('#canvas').setLayer(layer.name, {
handle: {
@@ -6241,7 +6272,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
},
mouseover: function (layer) {
-
+
$('#canvas').setLayer(layer.name, {
handle: {
type: 'rectangle',
@@ -6256,16 +6287,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
});
$("#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_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
+
}
function OnPaintCanvasMouseMove(event) {
-
+
}
$rootScope.FreeStylePaint = function (e) {
@@ -6677,7 +6708,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
$timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
- }
+ }
}
@@ -6691,7 +6722,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
- //var systemListHtml = ''
+ $('#bodySystems').empty();
var $all = $('').appendTo('#bodySystems');
$compile($all)($scope);
@@ -6700,11 +6731,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var $elem = $('').appendTo('#bodySystems');
$compile($elem)($scope);
- // systemListHtml = systemListHtml + '<'
})
- // $('#bodySystems').append(systemListHtml);
var currentView = localStorage.getItem("currentViewTitle");
@@ -6719,15 +6748,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.viewOrientationId = currentOpenViewId;
//confirm that this is DA module which is last open
if (currentOpenModuleId == 1) {
- //$http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
- // $rootScope.TermNumberData = data;
- // var actualtermList = new jinqJs()
- // .from($rootScope.TermNumberData.TermData.Term)
- // .select('_ActualTermNumber');
-
- // var TermTextList = [];
- // var TermTextList = [];
-
+
+ $('#termList').empty();
$scope.loadListManger();
@@ -6789,6 +6811,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
})
+
$scope.VocabTermTxt = new jinqJs()
.from(vocabTermTxt)
.distinct('_TermText', '_ActualTermNumber')
@@ -6812,7 +6835,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
// })
-
+
//.error(function (data, status, headers, config) {
// console.log(data);
@@ -6916,60 +6939,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//8.remove current layer canavses
$scope.flushCanvas();
- //for (var i = 1; i < 7; i++) {
-
- // var id;
- // var maskId;
-
- // id = 'imageCanvas' + i;
- // maskId = 'imageCanvas' + i + '_mci';
-
- // var canvas = document.getElementById(id);
- // document.getElementById('canvasDiv').removeChild(canvas);
-
- // var maskcanvas = document.getElementById(maskId);
- // document.getElementById('canvasDiv').removeChild(maskcanvas);
-
- // if (i == 4 || i == 5 || i == 6) {
- // id = 'imageCanvas' + i + '_MR';
- // maskId = 'imageCanvas' + i + '_MR_mci';
-
- // var canvas = document.getElementById(id);
- // document.getElementById('canvasDiv').removeChild(canvas);
-
- // var maskcanvas = document.getElementById(maskId);
- // document.getElementById('canvasDiv').removeChild(maskcanvas);
- // }
-
- // //remove modesty canavs
- // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
- // for (var j = 0; j < modestyCanvases.length; j++) {
- // modestyCanvases[j].remove();
- // }
- //}
+
//9.
$timeout(function () {
$rootScope.isHighLight = false;
- $scope.CalculateImageCordinates($rootScope.viewOrientationId)
- }, 500);
-
- $scope.isHighlightByListManager = true;
- //10.
- //$timeout(function () {
- // $rootScope.isHighLight = true;
- // $scope.highLightBody()
- //}, 500);
- //$timeout(function () {
+ //removing speechbubble
+ $('#sppeachBubble').css('display', 'none');
+ $("#dot").css("display", "none");
- // // $rootScope.isHighLight = false;
+ //redraw body of respective layer
+ $scope.CalculateImageCordinates($rootScope.viewOrientationId)
+ }, 500);
- // $scope.HighlightBodyByTermList($scope.TermList)
- //}, 2000);
-
- //4.get scroll position
+
}
$scope.getChildTermList = function (termNo) {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index fea551b..1c4a7ee 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -72,7 +72,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
if (alreadyOpenThisView != null) {
for (var i = 0; i < $rootScope.openViews.length; i++) {
k++;
- if ($rootScope.openViews[i].body - views == title) {
+ if ($rootScope.openViews[i].body-views == title) {
$rootScope.openViews.splice((k - 1), 1);
$rootScope.openViews.push(
@@ -259,7 +259,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
$rootScope.shapestyleOpacity = 1;
$rootScope.shapestyleFillColor = "#fff";
$rootScope.shapestyleFillBorderColor = "black";
- $rootScope.shapestyleborderWidth=2;
+ $rootScope.shapestyleborderWidth = 2;
$rootScope.shapestyleborderStyles = "solid";
$rootScope.shapestyle = function (id) {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
index a9238f6..c858031 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -340,7 +340,7 @@
range: "max", // <--- needed...
min: 0,
// max: 100,
- //value: 0,
+ value: 0,
slide: function (event, ui) {
// $("#txtlayerNumber").val(100 - ui.value); // basic math operation..