diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 3214a77..001ac48 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -4666,10 +4666,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) {
+ //1.
localStorage.setItem("genderId", 'Male');
+
+ //2.
+ $scope.loadSelectedBodyView(currentBodyViewId);
+ //3.
+ $scope.loadSelectedBodyViewNavigator(currentBodyViewId);
- $scope.loadSelectedBodyView(currentBodyViewId);
$('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female', 'Male');
$rootScope.isLoading = true;
@@ -4680,8 +4685,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
localStorage.setItem("genderId", 'Female');
+ //1.
+ $scope.loadSelectedBodyView(currentBodyViewId);
+
+ //2.
+ $scope.loadSelectedBodyViewNavigator(currentBodyViewId);
- $scope.loadSelectedBodyView(currentBodyViewId)
+ //3.
$('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male', 'Female');
$rootScope.isLoading = true;
@@ -4796,7 +4806,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.voId = selectedViewId;
$rootScope.isLoading = true;
+ //1. Load selected body view
$scope.loadSelectedBodyView($rootScope.voId);
+
+ //2. load corresponding navigator man
+ $scope.loadSelectedBodyViewNavigator($rootScope.voId);
+
};
@@ -4817,7 +4832,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.voId = selectedViewId;
$rootScope.isLoading = true;
+ //1.
$scope.loadSelectedBodyView($rootScope.voId);
+
+ //2.
+ $scope.loadSelectedBodyViewNavigator($rootScope.voId);
};
@@ -4887,6 +4906,43 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
+ $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
+
+ $rootScope.voId = currentBodyViewId;
+
+ $scope.skinTone = DA[0].ethnicity;
+
+ var navdtlOrient = new jinqJs()
+ .from($scope.NavigatorData.Navigtor.ViewOrientation)
+ .where("_ViewOrientationId == " + $scope.voId)
+ .select();
+ //console.log(navdtlOrient);
+ //console.log(navdtlOrient[0].ImageInfo);
+ var navOrientationdata = new jinqJs()
+ .from(navdtlOrient[0].ImageInfo)
+ .where("_Ethnicity == " + $scope.skinTone)
+ .select();
+ //console.log(navOrientationdata);
+
+ $scope.NavOrientationdata = navOrientationdata;
+ //console.log("$scope.NavOrientationdata: ");
+ //console.log($scope.NavOrientationdata);
+
+ var navimagemodesty;
+
+ angular.forEach($scope.NavOrientationdata, function (value, key) {
+ if (value._HaveModesty === DA[0].modesty) {
+ navimagemodesty = value._ImageName;
+ }
+ })
+ if (typeof (navimagemodesty) === "undefined" || navimagemodesty === null) {
+
+ navimagemodesty = $scope.NavOrientationdata[0]._ImageName;
+
+ }
+
+ $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navimagemodesty;
+ }
//Annotation tool event lsitener
$scope.$on('annotationToolEvent', function (event, data) {