Commit b8cff37e6a8f62a4282a93338b24fa77de6c25e9
Merge branch 'DAOpenViewIssue' into Develop
Showing
1 changed file
with
29 additions
and
21 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -472,7 +472,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -472,7 +472,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
472 | url: 'app/views/da/da-view.html' | 472 | url: 'app/views/da/da-view.html' |
473 | }, | 473 | }, |
474 | title: localStorage.getItem("currentViewTitle"), | 474 | title: localStorage.getItem("currentViewTitle"), |
475 | - | 475 | + |
476 | position: { | 476 | position: { |
477 | top: 70, | 477 | top: 70, |
478 | left: 1, | 478 | left: 1, |
@@ -482,6 +482,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -482,6 +482,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
482 | 482 | ||
483 | }); | 483 | }); |
484 | 484 | ||
485 | + console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) | ||
485 | //0.1 | 486 | //0.1 |
486 | $rootScope.currentSlug = 'da-body-view'; | 487 | $rootScope.currentSlug = 'da-body-view'; |
487 | 488 | ||
@@ -496,35 +497,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -496,35 +497,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
496 | //0.3 | 497 | //0.3 |
497 | var daBodyviewElement = angular.element(document.getElementById("daBodyview")); | 498 | var daBodyviewElement = angular.element(document.getElementById("daBodyview")); |
498 | 499 | ||
499 | - $timeout(function () { $compile(daBodyviewElement.contents())($scope) }, 250); | 500 | + $timeout(function () { |
501 | + $compile(daBodyviewElement.contents())($scope); | ||
500 | 502 | ||
503 | + console.log('html is compiled' + document.getElementById('daView')) | ||
504 | + if (document.getElementById('daView') != null) { | ||
501 | 505 | ||
502 | - //0.4 added some stylesheets | ||
503 | - $('#daBodyview').css("height", $(window).outerHeight()); | 506 | + //0.4 added some stylesheets |
507 | + $('#daBodyview').css("height", $(window).outerHeight()); | ||
504 | 508 | ||
505 | - $('#daBodyview').css("width", $(window).outerWidth()); | 509 | + $('#daBodyview').css("width", $(window).outerWidth()); |
506 | 510 | ||
507 | - //1. load navigator man first | ||
508 | - $scope.LoadBodyViewNavigatorImage(); | 511 | + //1. load navigator man first |
512 | + console.log('before LoadBodyViewNavigatorImage call') | ||
513 | + $scope.LoadBodyViewNavigatorImage(); | ||
509 | 514 | ||
510 | - //$scope.loadSearchDataForBodyView(); | 515 | + //$scope.loadSearchDataForBodyView(); |
511 | 516 | ||
512 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | 517 | + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
513 | 518 | ||
514 | - $scope.layerNumber = 0; | 519 | + $scope.layerNumber = 0; |
515 | 520 | ||
516 | - //2. | 521 | + //2. |
517 | 522 | ||
518 | - console.log('currentBodyViewId just before sending: ' + currentBodyViewId); | ||
519 | - $scope.loadBodyViewData(currentBodyViewId); | 523 | + console.log('currentBodyViewId just before sending: ' + currentBodyViewId); |
524 | + $scope.loadBodyViewData(currentBodyViewId); | ||
520 | 525 | ||
521 | - //2. load bodyRegion data | ||
522 | - $rootScope.isLoading = true; | ||
523 | - $rootScope.voId = localStorage.getItem("currentBodyViewId"); | 526 | + //2. load bodyRegion data |
527 | + $rootScope.isLoading = true; | ||
528 | + $rootScope.voId = localStorage.getItem("currentBodyViewId"); | ||
524 | 529 | ||
525 | - $('#daBodyview').css("height", $(window).outerHeight()); | 530 | + $('#daBodyview').css("height", $(window).outerHeight()); |
526 | 531 | ||
527 | - $('#daBodyview').css("width", $(window).outerWidth()); | 532 | + $('#daBodyview').css("width", $(window).outerWidth()); |
533 | + } | ||
534 | + }, 250); | ||
528 | } | 535 | } |
529 | 536 | ||
530 | angular.element(document).ready(function (e) { | 537 | angular.element(document).ready(function (e) { |
@@ -654,6 +661,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -654,6 +661,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
654 | 661 | ||
655 | //Code for displaying NavigatorImage for BodyView | 662 | //Code for displaying NavigatorImage for BodyView |
656 | $scope.LoadBodyViewNavigatorImage = function () { | 663 | $scope.LoadBodyViewNavigatorImage = function () { |
664 | + console.log('insideLoadBodyViewNavigatorImage') | ||
657 | var NavigatorManJsonPath = '~/../content/data/json/da/da_dat_orient_image.json'; | 665 | var NavigatorManJsonPath = '~/../content/data/json/da/da_dat_orient_image.json'; |
658 | 666 | ||
659 | $http({ method: 'GET', url: NavigatorManJsonPath }) | 667 | $http({ method: 'GET', url: NavigatorManJsonPath }) |
@@ -720,7 +728,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -720,7 +728,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
720 | 728 | ||
721 | 729 | ||
722 | $scope.LoadDefaultLayerImage = function () { | 730 | $scope.LoadDefaultLayerImage = function () { |
723 | - | 731 | + console.log('inside LoadDefaultLayerImage') |
724 | $rootScope.isNormalMode = true; | 732 | $rootScope.isNormalMode = true; |
725 | 733 | ||
726 | $scope.layerNumber = 0; | 734 | $scope.layerNumber = 0; |
@@ -799,8 +807,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -799,8 +807,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
799 | $rootScope.BodyRegionCordinatesData = []; // create an empty array | 807 | $rootScope.BodyRegionCordinatesData = []; // create an empty array |
800 | 808 | ||
801 | $('#daBodyview').css('width', '100%'); | 809 | $('#daBodyview').css('width', '100%'); |
802 | - $('#canvasDiv').css('height', $('#daImagePanel').outerHeight() - 104) | ||
803 | - //$('#canvasDiv').css('width', $('#daImagePanel').outerWidth() - 100) | 810 | + var canvasDIvHeight = parseInt($('#daImagePanel').outerHeight()) - 104; |
811 | + $('#canvasDiv').css('height', canvasDIvHeight); | ||
804 | $('#leftToolBar').css('height', $('#daImagePanel').outerHeight()) | 812 | $('#leftToolBar').css('height', $('#daImagePanel').outerHeight()) |
805 | 813 | ||
806 | 814 |