From fce5f57eca1b7931140847335837c0b41d8ffc2e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Jul 2017 11:41:15 +0530 Subject: [PATCH] Atlas Anatomy History Issue Code --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html | 2 +- 2 files changed, 58 insertions(+), 44 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 0cdf25d..314d997 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -64,7 +64,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.openModuleItemView = function (event) { - + debugger; //0. Get selected Image Id var moduleItemDataToBeSaved = event.target.id; @@ -138,51 +138,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo openedImage.onload = getImageHeightWidth; openedImage.onerror = loadFailure; openedImage.src = $rootScope.OpenItemImagePath; + openedImage.id = "modItemImage"; + // openedImage.id = "modItemImage"; + // left:0px;top:0px;position:absolute; + - $timeout(function () { - $compile(aaViewElement.contents())($scope); - - if (document.getElementById('aaDetailPageDiv') != null) { - - //0.4 added some stylesheets - $('#aaBodyView').css("height", $(window).outerHeight()); - $('#aaBodyView').css("width", $(window).outerWidth()); - - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); - $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); - - - $rootScope.ViewImageWidth = $("#modItemImage").width(); - $scope.ViewImageWidth = $("#modItemImage").width(); - $scope.ViewImageHeight = $("#modItemImage").height(); - - $scope.relativeDimesion = 0; - $("#modItemImage").css("width", $rootScope.ViewImageWidth + "px"); - + - //0.5 create canvas on the top of image so that I can draw a line over the canvas. - var canvas = document.createElement('canvas'); - canvas.id = 'aaDetailViewCanvas'; - canvas.className = '.aaCanvas' - canvas.height = parseInt(($scope.imageHeight)); - canvas.width = parseInt($scope.imageWidth); - canvas.style.left = '0px'; - canvas.style.top = '0px'; - canvas.style.position = "absolute"; - //canvas.addEventListener('click', function () { - // alert('canvas clicked'); - // var clickedPint = $scope.getMousePos(event); - // alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); - //}) - $("#canvasDiv").append(canvas); - $scope.context = canvas.getContext("2d") - //6. Show all pins on AA opened item - $scope.showAllPins(); - //7. Highlight all system body list in left side - $scope.highlightBodySystemList(); - } - }, 1050); + + } } @@ -209,6 +174,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo function getImageHeightWidth() { $scope.imageWidth = this.width; $scope.imageHeight = this.height; + $("#canvasDiv").append(openedImage); + $timeout(function () { + $compile(aaViewElement.contents())($scope); + + if (document.getElementById('aaDetailPageDiv') != null) { + + //0.4 added some stylesheets + $('#aaBodyView').css("height", $(window).outerHeight()); + $('#aaBodyView').css("width", $(window).outerWidth()); + + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); + $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); + + + $rootScope.ViewImageWidth = $("#modItemImage").width(); + $scope.ViewImageWidth = $("#modItemImage").width(); + $scope.ViewImageHeight = $("#modItemImage").height(); + + $scope.relativeDimesion = 0; + $("#modItemImage").css("width", $rootScope.ViewImageWidth + "px"); + + + //0.5 create canvas on the top of image so that I can draw a line over the canvas. + var canvas = document.createElement('canvas'); + canvas.id = 'aaDetailViewCanvas'; + canvas.className = '.aaCanvas' + canvas.height = parseInt(($scope.imageHeight)); + canvas.width = parseInt($scope.imageWidth); + canvas.style.left = '0px'; + canvas.style.top = '0px'; + canvas.style.position = "absolute"; + alert($scope.imageWidth); + //canvas.addEventListener('click', function () { + // alert('canvas clicked'); + // var clickedPint = $scope.getMousePos(event); + // alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); + //}) + $("#canvasDiv").append(canvas); + $scope.context = canvas.getContext("2d") + + //6. Show all pins on AA opened item + $scope.showAllPins(); + //7. Highlight all system body list in left side + $scope.highlightBodySystemList(); + } + }, 1050); + + + } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html index 857a765..c5a1c91 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html @@ -177,7 +177,7 @@ - +