Commit fce5f57eca1b7931140847335837c0b41d8ffc2e
1 parent
90bcb1e0
Atlas Anatomy History Issue Code
Showing
2 changed files
with
58 additions
and
44 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -64,7 +64,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
64 | 64 | } |
65 | 65 | |
66 | 66 | $scope.openModuleItemView = function (event) { |
67 | - | |
67 | + debugger; | |
68 | 68 | //0. Get selected Image Id |
69 | 69 | var moduleItemDataToBeSaved = event.target.id; |
70 | 70 | |
... | ... | @@ -138,51 +138,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
138 | 138 | openedImage.onload = getImageHeightWidth; |
139 | 139 | openedImage.onerror = loadFailure; |
140 | 140 | openedImage.src = $rootScope.OpenItemImagePath; |
141 | + openedImage.id = "modItemImage"; | |
142 | + // openedImage.id = "modItemImage"; | |
143 | + // left:0px;top:0px;position:absolute; | |
144 | + | |
141 | 145 | |
142 | - $timeout(function () { | |
143 | - $compile(aaViewElement.contents())($scope); | |
144 | - | |
145 | - if (document.getElementById('aaDetailPageDiv') != null) { | |
146 | - | |
147 | - //0.4 added some stylesheets | |
148 | - $('#aaBodyView').css("height", $(window).outerHeight()); | |
149 | - $('#aaBodyView').css("width", $(window).outerWidth()); | |
150 | - | |
151 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
152 | - $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); | |
153 | - | |
154 | - | |
155 | - $rootScope.ViewImageWidth = $("#modItemImage").width(); | |
156 | - $scope.ViewImageWidth = $("#modItemImage").width(); | |
157 | - $scope.ViewImageHeight = $("#modItemImage").height(); | |
158 | - | |
159 | - $scope.relativeDimesion = 0; | |
160 | - $("#modItemImage").css("width", $rootScope.ViewImageWidth + "px"); | |
161 | - | |
146 | + | |
162 | 147 | |
163 | - //0.5 create canvas on the top of image so that I can draw a line over the canvas. | |
164 | - var canvas = document.createElement('canvas'); | |
165 | - canvas.id = 'aaDetailViewCanvas'; | |
166 | - canvas.className = '.aaCanvas' | |
167 | - canvas.height = parseInt(($scope.imageHeight)); | |
168 | - canvas.width = parseInt($scope.imageWidth); | |
169 | - canvas.style.left = '0px'; | |
170 | - canvas.style.top = '0px'; | |
171 | - canvas.style.position = "absolute"; | |
172 | - //canvas.addEventListener('click', function () { | |
173 | - // alert('canvas clicked'); | |
174 | - // var clickedPint = $scope.getMousePos(event); | |
175 | - // alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); | |
176 | - //}) | |
177 | - $("#canvasDiv").append(canvas); | |
178 | - $scope.context = canvas.getContext("2d") | |
179 | 148 | |
180 | - //6. Show all pins on AA opened item | |
181 | - $scope.showAllPins(); | |
182 | - //7. Highlight all system body list in left side | |
183 | - $scope.highlightBodySystemList(); | |
184 | - } | |
185 | - }, 1050); | |
149 | + | |
150 | + | |
186 | 151 | } |
187 | 152 | } |
188 | 153 | |
... | ... | @@ -209,6 +174,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
209 | 174 | function getImageHeightWidth() { |
210 | 175 | $scope.imageWidth = this.width; |
211 | 176 | $scope.imageHeight = this.height; |
177 | + $("#canvasDiv").append(openedImage); | |
178 | + $timeout(function () { | |
179 | + $compile(aaViewElement.contents())($scope); | |
180 | + | |
181 | + if (document.getElementById('aaDetailPageDiv') != null) { | |
182 | + | |
183 | + //0.4 added some stylesheets | |
184 | + $('#aaBodyView').css("height", $(window).outerHeight()); | |
185 | + $('#aaBodyView').css("width", $(window).outerWidth()); | |
186 | + | |
187 | + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
188 | + $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); | |
189 | + | |
190 | + | |
191 | + $rootScope.ViewImageWidth = $("#modItemImage").width(); | |
192 | + $scope.ViewImageWidth = $("#modItemImage").width(); | |
193 | + $scope.ViewImageHeight = $("#modItemImage").height(); | |
194 | + | |
195 | + $scope.relativeDimesion = 0; | |
196 | + $("#modItemImage").css("width", $rootScope.ViewImageWidth + "px"); | |
197 | + | |
198 | + | |
199 | + //0.5 create canvas on the top of image so that I can draw a line over the canvas. | |
200 | + var canvas = document.createElement('canvas'); | |
201 | + canvas.id = 'aaDetailViewCanvas'; | |
202 | + canvas.className = '.aaCanvas' | |
203 | + canvas.height = parseInt(($scope.imageHeight)); | |
204 | + canvas.width = parseInt($scope.imageWidth); | |
205 | + canvas.style.left = '0px'; | |
206 | + canvas.style.top = '0px'; | |
207 | + canvas.style.position = "absolute"; | |
208 | + alert($scope.imageWidth); | |
209 | + //canvas.addEventListener('click', function () { | |
210 | + // alert('canvas clicked'); | |
211 | + // var clickedPint = $scope.getMousePos(event); | |
212 | + // alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); | |
213 | + //}) | |
214 | + $("#canvasDiv").append(canvas); | |
215 | + $scope.context = canvas.getContext("2d") | |
216 | + | |
217 | + //6. Show all pins on AA opened item | |
218 | + $scope.showAllPins(); | |
219 | + //7. Highlight all system body list in left side | |
220 | + $scope.highlightBodySystemList(); | |
221 | + } | |
222 | + }, 1050); | |
223 | + | |
224 | + | |
225 | + | |
212 | 226 | } |
213 | 227 | |
214 | 228 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... | ... | @@ -177,7 +177,7 @@ |
177 | 177 | <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas> |
178 | 178 | <canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas> |
179 | 179 | |
180 | - <img id="modItemImage" alt="" title="" style="left:0px;top:0px;position:absolute"> | |
180 | + <img id="modItemImage" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden;"> | |
181 | 181 | <!--<div class="clearfix"> |
182 | 182 | |
183 | 183 | <img id="modItemImage" ng-init="alert('hi')" alt="" title="" class="img-responsive"> | ... | ... |