From 4e8c3211d226d4295c2bd614d0c534c4327c74ee Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 May 2017 12:56:13 +0530 Subject: [PATCH] tileview.html has been changes --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 37 +++++++++++++++++-------------------- 400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js | 7 +++++++ 400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 109 insertions(+), 34 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 88a3d5b..03faead 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -16,7 +16,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('loadForModuleById is called') $rootScope.moduleName = Modules[moduleId].Name; - + var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) .then( @@ -55,8 +55,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - $scope.openModuleItem = function () - { + $scope.openModuleItem = function () { debugger; var jsContentURL; var moduleItemViewDivId; @@ -65,7 +64,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'; + moduleItemViewDivId = 'aaDetailPageDiv'; } else if ($rootScope.moduleName == CLINICAL_ANIMATION) { //to do, in next phase of project @@ -110,7 +109,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $timeout(function () { $compile(aaViewElement.contents())($scope); - + if (document.getElementById('aaDetailPageDiv') != null) { //0.4 added some stylesheets @@ -125,12 +124,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo canvas.height = parseInt(($scope.imageHeight)); canvas.width = parseInt($scope.imageWidth); canvas.style.left = '0px'; - canvas.style.top = '0px'; + canvas.style.top = '0px'; canvas.style.position = "absolute"; $("#imageDiv").append(canvas); $scope.context = canvas.getContext("2d") - + //6. Show all pins on AA opened item $scope.showAllPins(); } @@ -139,13 +138,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo function loadFailure() { console.log('unable to load opened module ietem'); - return true; + return true; } - function getImageHeightWidth() - { - $scope.imageWidth = this.width; - $scope.imageHeight = this.height; + function getImageHeightWidth() { + $scope.imageWidth = this.width; + $scope.imageHeight = this.height; } angular.element(document).ready(function (e) { @@ -164,9 +162,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo function (result) { $scope.aaPinData = result.data.Root.Item; debugger; - angular.forEach($scope.aaPinData, function (value, key) - { - + angular.forEach($scope.aaPinData, function (value, key) { + $scope.context.beginPath(); $scope.context.moveTo(value._PinX, value._PinY); $scope.context.lineTo(value._HeadX, value._HeadY); @@ -175,14 +172,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var headX = (parseInt(value._HeadX)) - 20; var headY = (parseInt(value._HeadY)) - 15; - var img = new Image(); - img.src = "~/../../../content/images/noraml-pin.png"; - img.onload = function () { + var img = new Image(); + img.src = "~/../../../content/images/noraml-pin.png"; + img.onload = function () { $scope.context.drawImage(img, headX, headY); } }) - + console.log(JSON.stringify(result, null, 4)); }, function (error) { @@ -196,5 +193,5 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }]); - + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index 3199e5c..e61c33e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -152,6 +152,13 @@ AIA.constant('pages', [ pageUrl: 'app/widget/MainView.html', pageController: 'HomeController' }, + { + name: 'Tiny View List view', + pageSlug: 'module-item-view', + pageUrl: 'app/views/module-item-view.html', + pageController: 'TileViewListController' + + }, { // id:3, name: 'Clinical Illustrations View', diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html index 053463c..5735420 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html @@ -3,30 +3,101 @@
+ + + +