diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index f413a96..3ac967c 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -56,9 +56,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($rootScope.moduleName == ATLAS_ANATOMY) {
jsContentURL = 'app/views/aa/atlas-anatomy-detail.html';
- moduleItemViewDivId = 'aaDetailPageDiv';
-
- //$scope.showAllPins();
+ moduleItemViewDivId = 'aaDetailPageDiv';
}
else if ($rootScope.moduleName == CLINICAL_ANIMATION) {
//to do, in next phase of project
@@ -96,9 +94,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$timeout(function () {
$compile(aaViewElement.contents())($scope);
-
- alert('aaView val: ' + document.getElementById(moduleItemViewDivId));
- //console.log('html is compiled' + document.getElementById('daView'))
+
if (document.getElementById('aaDetailPageDiv') != null) {
////0.4 added some stylesheets
$('#aaBodyView').css("height", $(window).outerHeight());
@@ -110,11 +106,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$("#modItemImage").attr('src', $rootScope.OpenItemImagePath);
- //$('#aaBodyView').css("height", $(window).outerHeight());
-
- //$('#aaBodyView').css("width", $(window).outerWidth());
+ $scope.getAllPinData();
}
- }, 250);
+ }, 550);
}
@@ -127,6 +121,76 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
})
+ $scope.getAllPinData = function () {
+
+ var promise = ModuleService.getPinDataForImage($rootScope.imageName)
+
+ .then(
+ function (result) {
+ $scope.aaPinData = result.data.Root.Item;
+ debugger;
+ angular.forEach($scope.aaPinData, function (value, key)
+ {
+
+ var pinLength1 = Math.sqrt((value._PinX - value._HeadX) * (value._PinX - value._HeadX) + (value._PinY - value._HeadY) * (value._PinY - value._HeadY));
+ var pinLength = pinLength1.toPrecision(2);
+
+ var pinData = '
';
+
+ //
+
+
+ //var divReference = document.getElementById("imageDiv");
+
+ $("#imageDiv").append(pinData);
+ })
+ // $scope.showAllPins();
+
+ console.log(JSON.stringify(result, null, 4));
+ },
+ function (error) {
+ // handle errors here
+ console.log(' error: ' + error.statusText);
+ }
+ )
+
+ }
+
+ $scope.showAllPins = function ()
+ {
+ //debugger;
+ //alert('showAllPins is called');
+
+ if ($scope.aaPinData = null || $scope.aaPinData != (undefined))
+ {
+
+ angular.forEach($scope.aaPinData, function (value, key)
+ {
+ debugger;
+
+ // alert('NO null pin data');
+ // var pinLength1 = Math.sqrt((638 - 604) * (638 - 604) + (83 - 120) * (83 - 120));
+ var pinLength1 = Math.sqrt((value._PinX - value[key]._HeadX) * (value._PinX - value._HeadX) + (value._PinY - value._HeadY) * (value._PinY - value._HeadY));
+ var pinLength = pinLength1.toPrecision(2);
+
+ var pinData = '';
+
+ //
+
+
+ // var divReference = document.getElementById("imageDiv");
+ // divReference.appendChild(pinData);
+ // alert(pinData);
+ $("#imageDiv").append(pinData);
+ })
+ }
+ else
+ {
+ // alert('null pin data');
+ }
+
+ }
+
}]);
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
index 30a3c5f..6791fa7 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
@@ -13,7 +13,7 @@ AIA.service('ModuleService', function($http, DataService) {
modName = moduleName;
- debugger;
+ //debugger;
if (moduleName == ATLAS_ANATOMY) {
jsonPath = '~/../content/data/json/aa/aa_dat_contentlist.json';
@@ -45,7 +45,7 @@ AIA.service('ModuleService', function($http, DataService) {
if (modName == ATLAS_ANATOMY)
{
- debugger;
+ //debugger;
var AADataForSelectedItem = [];
@@ -72,9 +72,8 @@ AIA.service('ModuleService', function($http, DataService) {
},
getPinDataForImage: function (imageName)
- {
+ {
debugger;
-
var pindataFileNamePart1 = imageName.replace("aa_img_", "");
var pinFileNamePart2 = pindataFileNamePart1.replace(".jpg", "");
@@ -86,7 +85,7 @@ AIA.service('ModuleService', function($http, DataService) {
var pinData = new jinqJs()
.from(response.data.Root.Item)
.select();
-
+ // alert(pinData.Root.Item);
return pinData;
});