diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 28ffb84..c189fb1 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -97,7 +97,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.IsSearchVisible = false;
-
+ $scope.shapesize = 1;
$scope.dragdivposition = {
"left": $scope.dragdivleft,
"top": $scope.dragdivtop
@@ -224,9 +224,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
userEthnicity = $rootScope.globalSetting.ethnicity;
}
- var curentmodesty = localStorage.getItem("globalmodesty");
+ var curentmodesty = localStorage.getItem("globalModesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
- userModestysettings = curentmodesty
+ userModestysettings = curentmodesty;
}
else {
userModestysettings = $rootScope.globalSetting.modesty;
@@ -355,7 +355,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.globalSetting.ethnicity = curentEthnicity;
}
- var curentmodesty = localStorage.getItem("globalmodesty");
+ var curentmodesty = localStorage.getItem("globalModesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
$rootScope.globalSetting.modesty = curentmodesty
}
@@ -1434,11 +1434,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
//$timeout(function () {
- // console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
+ console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
$rootScope.isHighLight = true;
- //console.log('just before highLightBody call');
+ console.log('just before highLightBody call');
$scope.highLightBody();
- //console.log('just after highLightBody call');
+ console.log('just after highLightBody call');
//}, 500);
}
}
@@ -1679,7 +1679,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.MultiLanguageAnnationArray.push(annotationText);
- // console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
+ console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
@@ -1691,7 +1691,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.MultiLanguageAnnationArray = [];
$scope.MultiLanguageAnnationArray.push(annotationText);
- //console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
+ console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
$scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true);
}
@@ -1805,11 +1805,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
//$timeout(function () {
- // console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
+ console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
$rootScope.isHighLight = true;
- //console.log('just before highLightBody call');
+ console.log('just before highLightBody call');
$scope.highLightBody();
- //console.log('just after highLightBody call');
+ console.log('just after highLightBody call');
//}, 500);
}
}
@@ -1957,7 +1957,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//push workers in array to further used the refernece to delete the workers
$scope.runningWorkers.push({ 'workerName': worker })
- //console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white)
+ console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white)
if (coloredImageDataVar != null && maskData != null && white != null) {
worker.postMessage({
@@ -2004,7 +2004,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var canavsWidth = parseInt(grayCanvas.width);
var canavsHeight = parseInt(grayCanvas.height);
- //console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight)
+ console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight)
var imgData = grayCanvasContext.getImageData(0, 0, canavsWidth, canavsHeight);
var data = imgData.data;
@@ -5376,13 +5376,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//1.
localStorage.setItem("genderId", 'Male');
- //2.
- $scope.loadSelectedBodyView(currentBodyViewId);
+ //2 first update the currentbodyviewid in local storage
+ localStorage.setItem("currentBodyViewId", currentBodyViewId);
//3.
+ $scope.loadSelectedBodyView(currentBodyViewId);
+
+ //4.
$scope.loadSelectedBodyViewNavigator(currentBodyViewId);
+ //5. change the search terms as per the selected bodyview
+ $scope.loadSearchDataForBodyView();
+ //6.
$('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female', 'Male');
localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Female', 'Male'));
@@ -5394,15 +5400,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else if ((event.currentTarget.attributes[1].value == 'Female') && (localStorage.getItem("genderId") == 'Male')) {
+ //1.
localStorage.setItem("genderId", 'Female');
- //1.
+ //2. first update the currentbodyviewid in local storage
+ localStorage.setItem("currentBodyViewId", currentBodyViewId);
+
+ //3.
$scope.loadSelectedBodyView(currentBodyViewId);
- //2.
+ //4.
$scope.loadSelectedBodyViewNavigator(currentBodyViewId);
- //3.
+ //5. change the search terms as per the selected bodyview
+ $scope.loadSearchDataForBodyView();
+
+ //6.
$('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male', 'Female');
localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Male', 'Female'));
@@ -5538,13 +5551,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.voId = selectedViewId;
$rootScope.isLoading = true;
- //1. Load selected body view
+ //1. first update the currentbodyviewid in local storage
+ localStorage.setItem("currentBodyViewId", $rootScope.voId);
+
+ //2. Load selected body view
$scope.loadSelectedBodyView($rootScope.voId);
- //2. load corresponding navigator man
+ //3. load corresponding navigator man
$scope.loadSelectedBodyViewNavigator($rootScope.voId);
- //3.Change the popup title next to search
+ //4. change the search terms as per the selected bodyview
+ $scope.loadSearchDataForBodyView();
+
+ //5.Change the popup title next to search
$scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
};
@@ -5662,35 +5681,35 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//console.log('reloadDABodyViewEvent');
$scope.layerNumber = parseInt($('#txtlayerNumber').val());
- $scope.ReloadBodyViewId = data.reloadDABodyViewId;
+ //$scope.ReloadBodyViewId = data.reloadDABodyViewId;
// $scope.layerNumber = 0;
// debugger;
- // console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId);
+ //console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId);
- if ($rootScope.isSettingEventAlredayDispachted == true) {
+ //if ($rootScope.isSettingEventAlredayDispachted == true) {
- $scope.loadSelectedBodyView($scope.ReloadBodyViewId);
+ $scope.loadSelectedBodyView(data.reloadDABodyViewId);
- $scope.loadSelectedBodyViewNavigator($scope.ReloadBodyViewId);
+ $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId);
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
- $rootScope.isSettingEventAlredayDispachted = false;
- }
+ //$rootScope.isSettingEventAlredayDispachted = false;
+ //}
})
$scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
- $rootScope.voId = currentBodyViewId;
+ //$rootScope.voId = currentBodyViewId;
- $scope.skinTone = $rootScope.globalSetting.ethnicity;
+ //$scope.skinTone = $rootScope.globalSetting.ethnicity;
if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) {
var navdtlOrient = new jinqJs()
.from($scope.NavigatorData.Navigtor.ViewOrientation)
- .where("_ViewOrientationId == " + $scope.voId)
+ .where("_ViewOrientationId == " + currentBodyViewId)
.select();
@@ -5698,7 +5717,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var navOrientationdata = new jinqJs()
.from(navdtlOrient[0].ImageInfo)
- .where("_Ethnicity == " + $scope.skinTone)
+ .where("_Ethnicity == " + $rootScope.globalSetting.ethnicity)
.select();
if (navOrientationdata != null || navOrientationdata != undefined) {
@@ -5719,7 +5738,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
- $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
+ $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;
}
}
@@ -5819,7 +5838,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var canvasElement = document.getElementById("canvas");
var ctx = canvasElement.getContext("2d");
-
+ var canvasElement1 = document.getElementById("canvasPaint");
+ var ctx1 = canvasElement1.getContext("2d");
/* if ($rootScope.shapeType == "FreeStylePaint") {
var canvasPaint_zIndex = $('#canvasPaint').css("z-index");
@@ -5840,6 +5860,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
case "cursor":
// ctx.clearRect(0, 0, 2277, 3248);
ctx.beginPath();
+ ctx1.beginPath();
break;
@@ -5983,7 +6004,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
break;
case "Circle":
- // alert($rootScope.shapestyleFillColor);
+ // alert($rootScope.shapestyleborderWidth);
$rootScope.resetCircle = $rootScope.ObjectIndex++;
$('#canvas').addLayer({
layer: true,
@@ -6351,7 +6372,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.textArea = $("#text_area").val();
$("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers();
$("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
- // alert($rootScope.fontColor);
+
$('#canvas').drawText({
layer: true,
draggable: true,
@@ -6369,6 +6390,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
maxWidth: $scope.x - $scope.offsetX1,
maxHeight: $scope.y - $scope.offsetY1,
+
click: function (layer) {
@@ -6479,7 +6501,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.OnPaintBrushCanvasMouseDown = function (event) {
+ switch ($rootScope.shapeType) {
+
+ case "FreeStylePaint":
+ debugger;
+ $('#canvasPaint').sketch({ defaultSize: 1 });
+ //if ($("#amount-2").val() == '') {
+ // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+ //}
+ //else {
+
+ // var a = $("#amount-2").val();
+ // $scope.shapesize = parseInt(a);
+ // // alert(JSON.stringify({ defaultSize: $scope.shapesize }));
+ // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+
+ //}
+
+
+ break;
+
+ }
}
$scope.OnPaintBrushCanvasMouseUp = function (event) {
@@ -6487,18 +6530,36 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// var canvasElement1 = document.getElementById("canvasPaint");
// var ctx1 = canvasElement1.getContext("2d");
- switch ($rootScope.shapeType) {
- case "FreeStylePaint":
+ //switch($rootScope.shapeType)
+ //{
- $('#canvasPaint').sketch({ defaultSize: 1 });
+ // case "FreeStylePaint":
- break;
+ // debugger;
+ // if ($("#amount-2").val() == '')
+ // {
+ // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+ // }
+ // else
+ // {
- }
+ // var a = $("#amount-2").val();
+ // $scope.shapesize = parseInt(a);
+ // alert(JSON.stringify({ defaultSize: $scope.shapesize }));
+ // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
+
+ // }
+
+
+ // break;
+
+ //}
}
+
+
$(document).keydown(function (event) {
@@ -6854,6 +6915,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$('#bodySystems').empty();
+
var $all = $('').appendTo('#bodySystems');
$compile($all)($scope);
@@ -6879,6 +6941,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//confirm that this is DA module which is last open
if (currentOpenModuleId == 1) {
+
$('#termList').empty();
$scope.loadListManger();
@@ -7072,11 +7135,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.flushCanvas();
+
//9.
$timeout(function () {
$rootScope.isHighLight = false;
-
- //removing speechbubble
$('#sppeachBubble').css('display', 'none');
$("#dot").css("display", "none");