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 | 472 | url: 'app/views/da/da-view.html' |
473 | 473 | }, |
474 | 474 | title: localStorage.getItem("currentViewTitle"), |
475 | - | |
475 | + | |
476 | 476 | position: { |
477 | 477 | top: 70, |
478 | 478 | left: 1, |
... | ... | @@ -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 | 486 | //0.1 |
486 | 487 | $rootScope.currentSlug = 'da-body-view'; |
487 | 488 | |
... | ... | @@ -496,35 +497,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
496 | 497 | //0.3 |
497 | 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 | 537 | angular.element(document).ready(function (e) { |
... | ... | @@ -654,6 +661,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
654 | 661 | |
655 | 662 | //Code for displaying NavigatorImage for BodyView |
656 | 663 | $scope.LoadBodyViewNavigatorImage = function () { |
664 | + console.log('insideLoadBodyViewNavigatorImage') | |
657 | 665 | var NavigatorManJsonPath = '~/../content/data/json/da/da_dat_orient_image.json'; |
658 | 666 | |
659 | 667 | $http({ method: 'GET', url: NavigatorManJsonPath }) |
... | ... | @@ -720,7 +728,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
720 | 728 | |
721 | 729 | |
722 | 730 | $scope.LoadDefaultLayerImage = function () { |
723 | - | |
731 | + console.log('inside LoadDefaultLayerImage') | |
724 | 732 | $rootScope.isNormalMode = true; |
725 | 733 | |
726 | 734 | $scope.layerNumber = 0; |
... | ... | @@ -799,8 +807,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
799 | 807 | $rootScope.BodyRegionCordinatesData = []; // create an empty array |
800 | 808 | |
801 | 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 | 812 | $('#leftToolBar').css('height', $('#daImagePanel').outerHeight()) |
805 | 813 | |
806 | 814 | ... | ... |