diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index bdb10e8..f6e1f2c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -26,6 +26,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.TBDrawStartX; $scope.TBDrawStartY; + + //array for bodyviewid correspoing to male female(used for gender change) + $scope.correspondingBodyViewIds = { + '1': '5', + '2': '6', + '3': '7', + '4': '8', + '9': '11', + '10': '12', + + '5': '1', + '6': '2', + '7': '3', + '8': '4', + '11': '9', + '12': '10', + + } + $scope.isBodylayerdataLoaded = false; $scope.isBodyRegionDataLoaded = false; $scope.showme = false; @@ -201,20 +220,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var layerJsonPath = ''; var bgArtJsonPath = ''; var CommonViewId = 0; - //get layer data for body view - //if (currentBodyViewId == 12) { - // CommonViewId = 10; - // layerJsonPath = '~/../content/data/json/da/bodyView/' + CommonViewId + '/da_dat_layer_' + CommonViewId + '.json'; - //} - //else if (currentBodyViewId == 11) - //{ - // CommonViewId = 9; - // layerJsonPath = '~/../content/data/json/da/bodyView/' + CommonViewId + '/da_dat_layer_' + CommonViewId + '.json'; - //} - //else - //{ + layerJsonPath = '~/../content/data/json/da/bodyView/' + currentBodyViewId + '/da_dat_layer_' + currentBodyViewId + '.json'; - //} + DataService.getAnotherJson(layerJsonPath) @@ -2478,6 +2486,47 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } + $scope.OnGenderChange = function (event) { + debugger; + //use $scope.correspondingBodyViewIds for getting correspnding viewid + alert('gender changed= ' + event.currentTarget.attributes[1].value) + if (event.currentTarget.attributes[1].value == 'Male') { + if (localStorage.getItem("genderId") == 'Male') { + + } + else { + switch ($scope.voId) { + case 1: + $scope.voId = 5; + break; + } + + $scope.CalculateImageCordinates($scope.viewOrientationId) + } + } + else if (event.currentTarget.attributes[1].value == 'Female') { + if (localStorage.getItem("genderId") == 'Male') { + switch ($scope.voId) { + case "1": + $scope.voId = "5"; + break; + } + + var canDiv = document.getElementById('canvasDiv'); + var canDivChildCount = canDiv.childElementCount; + if (canDivChildCount > 0) { + canDiv.innerHTML = ''; + } + //load corresponding json files + + $scope.CalculateImageCordinates($scope.viewOrientationId) + + } + else { + } + } + } + }] 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 b96f805..d0d300a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -57,8 +57,8 @@