Commit 24e2aa08beac92bc8119d844f2702675ac706e42

Authored by Mitali Srivastava
1 parent fba1b7a5

Navigator working fine.

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -87,18 +87,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
87 87 $scope.isBodyRegionDataLoaded = false;
88 88 //currentTitleFromJson shows the current BodyView Title
89 89 $scope.currentTitleFromJson;
  90 +
90 91 //navigator man functionality
91 92 $scope.NavOrientationdata;
92 93 $scope.NavigatorData;
93 94 $scope.navimgsrc;
94 95  
95   - $scope.dragdivleft=35;
96   - $scope.dragdivtop=10;
  96 + $scope.dragdivleft=0;
  97 + $scope.dragdivtop=0;
97 98  
98 99 $scope.dragdivposition = {
99 100 "left": $scope.dragdivleft,
100 101 "top": $scope.dragdivtop
101 102 };
  103 + //Navman scope ends
102 104  
103 105 $scope.showme = false;
104 106 $scope.IsVisible = function () {
... ... @@ -810,7 +812,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
810 812  
811 813 }
812 814 else {
813   - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
  815 + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
814 816 }
815 817 // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
816 818 $('#canvasDiv').scrollTop(50)
... ... @@ -826,15 +828,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
826 828  
827 829 //NavMan Code
828 830  
829   - //var navdivh = Math.floor($('#canvasDiv').height() / 3);
830   - //var navdivw = Math.floor($('#canvasDiv').width() / 9);
  831 + var navdivh = Math.floor($('#canvasDiv').height() / 3);
  832 + var navdivw = Math.floor($('#canvasDiv').width() / 9);
  833 +
  834 + var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image
  835 +
  836 + if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) {
831 837  
832   - //alert("nav div height and width should be:" + navdivh + "navdivw");
  838 + var dragdivw = 42
  839 + $scope.dragdivleft = 21;
  840 + $scope.dragdivtop = 0;
  841 +
  842 + $scope.dragdivposition = {
  843 + "left": 21,
  844 + "top": 0
  845 + };
  846 + }
  847 + else
  848 + {
  849 + var dragdivw = 83;
  850 +
  851 + $scope.dragdivleft = 0;
  852 + $scope.dragdivtop = 0;
  853 +
  854 + $scope.dragdivposition = {
  855 + "left": 0,
  856 + "top": 0
  857 +
  858 + };
  859 + }
833 860  
834   - //$('#containment-wrapper').css('width', navdivw);
835   - //$('#containment-wrapper').css('height', navdivh)
836   - //$scope.ycan = $("#canvasDiv").scrollTop();
837   - //$scope.xcan = $("#canvasDiv").scrollLeft();
  861 + $('#draggable').css('width', dragdivw);
  862 + $('#draggable').css('height', dragdivh)
838 863 }
839 864  
840 865 function scaleRectangle(x, y, height, width, mirrorValue) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -15,7 +15,8 @@
15 15 </style>-->
16 16  
17 17 <style>
18   - #draggable { width: 50px; height: 26px;opacity: 0.2;border:solid;position:absolute;}
  18 + /*#draggable { width: 50px; height: 26px;opacity: 0.2;border:solid;position:absolute;}*/
  19 + #draggable { opacity: 0.2;border:solid;position:absolute;}
19 20 #wrapper {
20 21 position: relative;
21 22 width: 100%;
... ... @@ -199,34 +200,19 @@
199 200 <i class="fa fa-male"></i>
200 201 </button>
201 202  
202   - <div class="dropdown-menu active" style="min-height:144px;min-width:auto;">
203   - <div class="paddlftrgt10" id="containment-wrapper" align="center" style="width:120px;height:144px;">
204   - <!--<img src="~/../content/images/DA/ethnicity/body-views/1/A/navigator_images/da_oi_81.jpg" alt="">-->
205   - <img src="{{navimgsrc}}" alt=""></img>
  203 + <div class="dropdown-menu active" style="min-height:119px;min-width:auto;">
  204 + <div id="containment-wrapper" align="center" style="min-width:auto;height:119px;">
  205 + <img id="navimg" src="{{navimgsrc}}" alt=""></img>
206 206 <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition">
207 207 </div>
208 208 </div>
209 209 </div>
210   - <!--<div id="Navcanvasdiv" class="dropdown-menu active" style="min-width:auto;">
211   - <div class="paddlftrgt10">
212   - <canvas id="navcanvas" align="center"></canvas>
213   - </div>
214   - </div>-->
215   -
216 210 </div>
217 211  
218 212 </div>
219 213 </div>
220 214 </div>
221 215  
222   - <!--<div id="Navcanvasdiv" class="collapse">
223   - <canvas id="navcanvas">
224   - <div class="draggable ui-widget-content">
225   - <p id="draggable4" class="ui-widget-header">I'm contained within my parent</p>
226   - </div>
227   - </canvas>
228   - </div>-->
229   -
230 216  
231 217  
232 218 <div class=" canavsParent col-sm-12 " id="cp">
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -219,9 +219,6 @@ footer.dark {
219 219 .marginTopBtm10 {
220 220 margin: 10px 0!important
221 221 }
222   -.paddingTopBtm10 {
223   - padding: 10px 0
224   -}
225 222 .page-header {
226 223 border-bottom: 0!important
227 224 }
... ... @@ -770,5 +767,6 @@ cursor:pointer;
770 767 }
771 768  
772 769 .annotationbar {
773   - max-width: 300px;
774   - width: 100%;
775 770 \ No newline at end of file
  771 + max-width: 300px;
  772 + width: 100%;
  773 +}
... ...