Commit 420d34b843d65d659e1be0813535075c84f236f5

Authored by Amrita Vishnoi
1 parent 8f52532a

Modifications as per my website setup on local IIS

400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj
... ... @@ -111,7 +111,7 @@
111 111 <AutoAssignPort>True</AutoAssignPort>
112 112 <DevelopmentServerPort>63874</DevelopmentServerPort>
113 113 <DevelopmentServerVPath>/</DevelopmentServerVPath>
114   - <IISUrl>http://localhost/AIAHTML5/API</IISUrl>
  114 + <IISUrl>http://localhost/AIA/API</IISUrl>
115 115 <NTLMAuthentication>False</NTLMAuthentication>
116 116 <UseCustomServer>False</UseCustomServer>
117 117 <CustomServerUrl>http://182.19.10.91/AIAHTML5</CustomServerUrl>
... ...
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
... ... @@ -21009,7 +21009,7 @@
21009 21009 <AutoAssignPort>True</AutoAssignPort>
21010 21010 <DevelopmentServerPort>55837</DevelopmentServerPort>
21011 21011 <DevelopmentServerVPath>/</DevelopmentServerVPath>
21012   - <IISUrl>http://localhost/AIAHTML5</IISUrl>
  21012 + <IISUrl>http://localhost/AIA</IISUrl>
21013 21013 <NTLMAuthentication>False</NTLMAuthentication>
21014 21014 <UseCustomServer>False</UseCustomServer>
21015 21015 <CustomServerUrl>http://182.19.10.91/AIAHTML5</CustomServerUrl>
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js.orig deleted
1   -'use strict';
2   -
3   -AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "GetJsonService",
4   -function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, GetJsonService) {
5   -
6   - $scope.genderId = "";
7   - $scope.BodyViewData;
8   - $scope.selectedGenderBodyViewData;
9   - $scope.imagePath = "";
10   - $scope.BodyRegionData;
11   - $scope.BodyRegionCordinatesData;
12   - $scope.isTransparencyActivated;
13   - $scope.BodyLayerData;
14   - $scope.VocabTermData;
15   - $scope.TermNumberData;
16   - $scope.bodyViewId = 0;
17   - //view specific constants
18   - $scope.voId;
19   - $scope.layerNumber;
20   - $scope.daCounter = 1;
21   -
22   -<<<<<<< HEAD
23   - $scope.isBodylayerdataLoaded = false;
24   - $scope.isBodyRegionDataLoaded = false;
25   -=======
26   - $scope.showme = false;
27   - $scope.IsVisible = function () {
28   - $scope.showme = $scope.showme ? false : true;
29   - }
30   -
31   ->>>>>>> 01c224168d3c3556a6e2ccc55c9a76814ff07d22
32   -
33   - //get the DA body view list based on selected gender
34   - $scope.getDAViewList = function ($event) {
35   -
36   - // debugger;
37   - if ($('#MainImage') != null) {
38   - $('#MainImage').remove();
39   - }
40   - $rootScope.currentActiveModuleTitle = Modules[0].Name;
41   - $("#bodyViewList").empty();
42   - //for default load
43   - if ($event == null) {
44   - $scope.genderId = "Male";
45   - }
46   - else {
47   - $scope.genderId = $event.currentTarget.id;
48   - }
49   - if ($event != null) {
50   - if ($event.currentTarget.id == "Male") {
51   - $('#Male').addClass('active');
52   - $('#Female').removeClass("active");
53   - }
54   - else {
55   - $('#Female').addClass('active');
56   - $('#Male').removeClass("active");
57   - }
58   -
59   - }
60   - $scope.selectedGenderBodyViewData = new jinqJs()
61   - .from($scope.BodyViewData.BodyViews.view)
62   - .where('_gender == ' + $scope.genderId)
63   - .select();
64   -
65   -
66   - angular.forEach($scope.selectedGenderBodyViewData, function (value, key) {
67   -
68   - var userEthnicity = DA[0].ethnicity;
69   - var userModestysettings = DA[0].modesty;
70   - var userSelectedSkintone = 'W';
71   - $scope.userModestySetting = 'Y'
72   - var thumbnailImage;
73   - if ((value._id == 1) || (value._id == 3) || (value._id == 5) || (value._id == 6) || (value._id == 7) || (value._id == 11))
74   - thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity + userModestysettings)) + '.jpg';
75   - else {
76   - thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity)) + '.jpg';
77   -
78   - }
79   -
80   - $scope.imagePath = "~/../content/images/DA/BodyViews/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage;
81   - // debugger;
82   -
83   - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >'
84   - + '<img class= "daImg" id="' + value._title + '" src="' + $scope.imagePath + '" alt="" title="" >'
85   - + '<div class="caption"><p>' + value._title + '</p></div></a></div></div>').appendTo('#bodyViewList');
86   -
87   -
88   - $compile($el)($scope);
89   - $(".sidebar").mCustomScrollbar({
90   - autoHideScrollbar: true,
91   - //theme:"rounded"
92   - });
93   -
94   - });
95   -
96   - };
97   -
98   -
99   -
100   - $scope.openView = function ($event) {
101   - // debugger;
102   - $rootScope.currentBodyViewId = $event.currentTarget.id;
103   - $rootScope.ViewTitle = $event.currentTarget.textContent;
104   -
105   - localStorage.setItem("currentViewTitleFromJson", $event.currentTarget.textContent);
106   - localStorage.setItem("currentBodyViewId", $event.currentTarget.id);
107   -
108   - var u = $location.url();
109   - $location.url('/da-body-view');
110   -
111   -
112   - }
113   -
114   -
115   - //load json data for body view
116   - $scope.loadDissectibleAnatomyData = function () {
117   -
118   - $rootScope.ClearIframe();
119   - //load bodyView data
120   - $http({ method: 'GET', url: '~/../content/data/json/da_dat_contentlist.json' }).success(function (data) {
121   -
122   - $scope.BodyViewData = data;
123   - //load default body view list for male
124   - $scope.getDAViewList();
125   -
126   - })
127   - .error(function (data, status, headers, config) {
128   - console.log(data);
129   - });
130   -
131   -
132   - $('#daLoaderLabel').css('visibility', 'hidden')
133   -
134   -
135   - $http({ method: 'GET', url: '~/../content/data/json/da_dat_tm_sg_1.json' }).success(function (data) {
136   - $scope.TermNumberData = data;
137   -
138   - })
139   - .error(function (data, status, headers, config) {
140   - console.log(data);
141   - });
142   -
143   -
144   - //load vocabterm data
145   - $http({ method: 'GET', url: '~/../content/data/json/cm_dat_vocabterm_1.json' }).success(function (data) {
146   - $scope.VocabTermData = data;
147   - })
148   - .error(function (data, status, headers, config) {
149   - console.log(data);
150   - });
151   -
152   - //push the details of open module in array $rootScope.openModules
153   - $rootScope.openModules.push({ "ModuleId": 1 });
154   - }
155   -
156   -
157   - //da-body-view functions
158   -
159   - $scope.openBodyView = function () {
160   - //debugger;
161   -
162   - //load bodyRegion data
163   - var brViewdata = GetJsonService.getJson('~/../content/data/json/da_dat_brview.json')
164   - brViewdata.then(
165   - function (result) {
166   - // debugger;
167   - $scope.BodyRegionData = result;
168   - $scope.isBodyRegionDataLoaded = true;
169   - // alert('da_dat_brview= ' + result)
170   -
171   - //get layer data for body view
172   - GetJsonService.getAnotherJson('~/../content/data/json/da_dat_layer_1.json')
173   - .then(
174   - function (result) {
175   - //debugger;
176   -
177   - $scope.BodyLayerData = result;
178   - $scope.isBodylayerdataLoaded = true;
179   -
180   - //load json for annotations
181   - $http({ method: 'GET', url: '~/../content/data/json/da_dat_tm_sg_1.json' }).success(function (data) {
182   - $scope.TermNumberData = data;
183   - })
184   - .error(function (data, status, headers, config) {
185   - console.log(data);
186   - });
187   -
188   - //load vocabterm data
189   - $http({ method: 'GET', url: '~/../content/data/json/cm_dat_vocabterm_1.json' }).success(function (data) {
190   - $scope.VocabTermData = data;
191   - })
192   - .error(function (data, status, headers, config) {
193   - console.log(data);
194   - });
195   -
196   -
197   -
198   - var openViews;
199   -
200   - var currentBodyViewId = localStorage.getItem("currentBodyViewId");
201   - // debugger;
202   - if ($rootScope.openViews.length > 0) {
203   - openViews = new jinqJs()
204   - .from($rootScope.openViews)
205   - .where("BodyViewId==" + currentBodyViewId)
206   - .select();
207   - }
208   - var counter = 1;
209   -
210   - // var tittle = $rootScope.ViewTitle;
211   - var tittle = localStorage.getItem("currentViewTitleFromJson");
212   -
213   - if (openViews != null && openViews.length > 0) {
214   - angular.forEach(openViews, function (value, key) {
215   -
216   - if (value.BodyView == tittle) {
217   - tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
218   - $rootScope.currentActiveViewTitle = tittle;
219   - localStorage.setItem("currentViewTitle", tittle);
220   - }
221   -
222   - });
223   - }
224   - else {
225   - localStorage.setItem("currentViewTitle", tittle);
226   - }
227   -
228   -
229   - $.jsPanel({
230   - id: 'daImagePanel',
231   - selector: '.daBodyView',
232   - theme: 'success',
233   - ajax: {
234   - url: 'app/views/da/da-view.html'
235   - },
236   - title: localStorage.getItem("currentViewTitle"),
237   - position: {
238   - top: 70,
239   - left: 1,
240   - },
241   -
242   - size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 },
243   -
244   - });
245   -
246   -
247   -
248   -
249   -
250   -
251   - // $rootScope.openViewsDA.push({ "ViewId": 1 });
252   - $rootScope.currentSlug = 'da-body-view';
253   -
254   - //hide scrollbar
255   -
256   -
257   - $rootScope.openViews.push(
258   - {
259   - "module": $rootScope.currentActiveModuleTitle, "BodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
260   - "slug": $rootScope.currentSlug
261   - }
262   - );
263   - // debugger;
264   -
265   - var e1 = angular.element(document.getElementById("daBodyview"));
266   - $timeout(function () { $compile(e1.contents())($scope) }, 250);
267   - // $compile(e1.contents())($scope);
268   -
269   - $('#daBodyview').css("height", $(window).outerHeight());
270   -
271   - $('#daBodyview').css("width", $(window).outerWidth());
272   -
273   - // debugger
274   - if ($scope.isBodylayerdataLoaded) {
275   - $timeout(function () { $scope.LoadDefaultLayerImage() }, 350);
276   - }
277   - },
278   - function (error) {
279   - // handle errors here
280   - console.log(' $scope.BodyLayerData= ' + error.statusText);
281   - }
282   - );
283   - },
284   - function (error) {
285   - // handle errors here
286   - console.log(' $scope.BodyRegionData = ' + error.statusText);
287   - }
288   - );
289   -
290   - // debugger
291   -
292   - }
293   -
294   - angular.element(document).ready(function () {
295   -
296   -
297   - })
298   -
299   -
300   -
301   -
302   -
303   -
304   -
305   -
306   - $scope.LoadDefaultLayerImage = function () {
307   - // debugger;
308   -
309   -
310   - // debugger;
311   -
312   - $scope.voId = localStorage.getItem("currentBodyViewId");;
313   - $scope.layerNumber = 0;
314   - $scope.skinTone = DA[0].ethnicity;
315   -
316   - // $timeout(function () { $scope.CalculateImageCordinates($scope.voId); }, 350);
317   -
318   - $scope.CalculateImageCordinates($scope.voId);
319   - };
320   -
321   -
322   - //calculate coordinates for body region images
323   - $scope.CalculateImageCordinates = function (viewOrientationId) {
324   -
325   - // debugger;
326   - //load json data
327   - // $http({ method: 'GET', url: '~/../content/data/json/da_dat_brview.json' }).success(function (data) {
328   - // alert('da_dat_brview.json')
329   - // $scope.BodyRegionData = data;
330   - // alert(data)
331   - // // console.log($scope.BodyRegionData);
332   - // })
333   - //.error(function (data, status, headers, config) {
334   - // console.log(data);
335   - //});
336   -
337   -
338   - // // Load Layer data
339   - // $http({ method: 'GET', url: '~/../content/data/json/da_dat_layer_1.json' }).success(function (data) {
340   - // // debugger
341   - // $scope.BodyLayerData = data;
342   - // console.log($scope.BodyLayerData);
343   -
344   - // })
345   - // .error(function (data, status, headers, config) {
346   - // console.log(data);
347   - // });
348   -
349   -
350   -
351   -
352   - //set height of canvas div and left tool bar as per window size
353   - $scope.BodyRegionCordinatesData = []; // create an empty array
354   -
355   - $('#canvasDiv').css('height', $('#daImagePanel').outerHeight() - 104)
356   - //$('#canvasDiv').css('width', $('#daImagePanel').outerWidth() - 100)
357   - $('#leftToolBar').css('height', $('#daImagePanel').outerHeight())
358   -
359   -
360   -
361   - //calculate image coordinates and draw image
362   - var bodyRegionCoordinates = $scope.BodyRegionData.BodyRegionViews;
363   - var viewOrientationId = String($scope.voId);
364   -
365   -
366   - $scope.bodyRegionCoordinates = new jinqJs()
367   - .from($scope.BodyRegionData.BodyRegionViews.BodyRegionCordinates)
368   - .where('_ViewOrientationId == ' + viewOrientationId)
369   - .select();
370   -
371   - angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
372   -
373   -
374   - if (value._HaveMirrorImage == 'Y') {
375   -
376   - //DrawMirroredImage
377   -
378   - //0. Scaling as per default zoom
379   - var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
380   -
381   - //1.Get image source
382   - var src = $scope.GetImageSource(value._BodyRegionId);
383   - $scope.imageSource = src;
384   - // debugger;
385   - //2.Draw mirror image
386   - $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
387   - // debugger;
388   - $scope.BodyRegionCordinatesData.push(
389   - {
390   - "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
391   - "X": Math.round(rectangle.scaledX), "Y": Math.round(rectangle.scaledY), "IsMirror": 'Yes'
392   - }
393   - );
394   -
395   - //3.GetMaskImageSource
396   - var maskImageSrc = $scope.GetMaskImageSource($scope.imageSource);
397   - // debugger;
398   - //4 Draw Mask Mirror Image
399   - $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), maskImageSrc, value._BodyRegionId, 'Y');
400   -
401   -
402   - //Draw Normal Image
403   -
404   - //0. Scaling as per default zoom
405   - var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, 0);
406   -
407   - //1.Draw body region which have mirror image
408   - $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
409   - $scope.BodyRegionCordinatesData.push(
410   - {
411   - "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
412   - "X": Math.round(rectangle.scaledX), "Y": Math.round(rectangle.scaledY), "IsMirror": 'No'
413   - }
414   - );
415   -
416   - //2.Draw body region for mask image
417   - $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), maskImageSrc, value._BodyRegionId, 'Y');
418   -
419   -
420   - }
421   - else {
422   - //Draw body region which don't have mirror image
423   -
424   - //0.Scaling as per default zoom
425   - var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
426   -
427   - //1.Get image source
428   - var src = $scope.GetImageSource(value._BodyRegionId);
429   - $scope.imageSource = src;
430   -
431   - //2.Draw body region which don't have mirror image
432   - $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
433   -
434   - $scope.BodyRegionCordinatesData.push(
435   - {
436   - "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
437   - "X": Math.round(rectangle.scaledX), "Y": Math.round(rectangle.scaledY), "IsMirror": 'No'
438   - }
439   - );
440   -
441   - //3.GetMaskImageSource
442   - var maskSRC = $scope.GetMaskImageSource($scope.imageSource);
443   -
444   - //4.Draw body region for mask image
445   - $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), maskSRC, value._BodyRegionId, 'Y');
446   -
447   - }
448   -
449   -
450   - });
451   -
452   - //set scrollbars on canvas and hide loading label
453   - $('#daLoaderLabel').css('visibility', 'hidden')
454   - $('#canvasDiv').css('overflow', 'scroll')
455   - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
456   - // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
457   - $('#canvasDiv').scrollTop(50)
458   - var abc = $scope.BodyRegionCordinatesData;
459   - // debugger;
460   - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber));
461   -
462   -
463   - }
464   -
465   - function scaleRectangle(x, y, height, width, mirrorValue) {
466   - var nzoom = 75;
467   - var existingZoon = 100;
468   -
469   - var X = 0;
470   - var scaledY = 0;
471   - var scaledHeight = 0;
472   - var scaledWidth = 0;
473   -
474   - if (mirrorValue != 0) {
475   - var mirroredX = parseInt(mirrorValue) + parseInt(x);
476   - var newX = (mirroredX * nzoom);
477   - mirroredX = (newX / existingZoon);
478   - X = mirroredX;
479   - }
480   - else {
481   - var newX = (x * nzoom);
482   - X = (newX / existingZoon);
483   - }
484   -
485   - var newY = (y * nzoom);
486   - var Y = (newY / existingZoon);
487   -
488   - var newHeight = (height * nzoom);
489   - var ht = (newHeight / existingZoon);
490   -
491   - var newWidth = (width * nzoom);
492   - var wt = (newWidth / existingZoon);
493   -
494   - return {
495   - scaledX: X,
496   - scaledY: Y,
497   - scaledHeight: ht,
498   - scaledWidth: wt
499   - }
500   - }
501   -
502   - $scope.GetMaskImageSource = function (src) {
503   - var mciImage = src.replace('.jpg', '_mci.png')
504   - return mciImage;
505   -
506   - }
507   -
508   -
509   - $scope.GetImageSource = function (bodyRegionId) {
510   - // debugger;
511   - var dataLength = $scope.BodyLayerData.Layers.DataLayer.length;
512   -
513   - //set max for LayerNumber input
514   - $scope.totalLayers = dataLength - 1;
515   -
516   - $('#txtLayerNumber').attr('max', $scope.totalLayers);
517   - $('#layerChangeSlider').slider("option", "max", $scope.totalLayers);
518   - // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($scope.layerNumber));
519   -
520   - $scope.one = 1;
521   -
522   - $scope.userInput = parseInt($scope.layerNumber);
523   -
524   -
525   - var SelectedLayerData = [];
526   - SelectedLayerData = $scope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1];
527   - if ($scope.layerNumber == 0) {
528   - for (var z = 0; z <= SelectedLayerData.BodyRegion.length; z++) {
529   -
530   - var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId;
531   - var bodyRegionSkinTone = SelectedLayerData.BodyRegion[z].Image._SkintTone;
532   -
533   - if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) {
534   -
535   - return "content/images/DA/BodyViews/" + $scope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
536   - }
537   - }
538   - }
539   -
540   - else {
541   - for (z = 0; z <= SelectedLayerData.BodyRegion.length; z++) {
542   - var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId;
543   - if (bodyRegion == bodyRegionId) {
544   - return "content/images/DA/BodyViews/" + $scope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
545   - }
546   - }
547   - }
548   - }
549   -
550   -
551   - $scope.DrawMirroredImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
552   -
553   - var FlipedImgCanvas = document.createElement('canvas');
554   - FlipedImgCanvas.height = h;
555   - FlipedImgCanvas.width = w;
556   - FlipedImgCanvas.setAttribute("data-IsMirrored", "Y")
557   - FlipedImgCanvas.style.position = "absolute";
558   - FlipedImgCanvas.style.left = x + "px";
559   - FlipedImgCanvas.style.top = y + "px";
560   -
561   - if (isMaskImage == 'Y') {
562   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci';
563   - FlipedImgCanvas.style.visibility = 'hidden'
564   -
565   - }
566   - else {
567   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR';
568   - FlipedImgCanvas.style.visibility = 'visible'
569   -
570   - }
571   - FlipedImgCanvas.addEventListener('click', function (evt) {
572   -
573   - //get mouse coordinate of mirror image click
574   - var mousePos = $scope.getMousePos(evt);
575   - //alert(mousePos.x + ',' + mousePos.y);
576   -
577   - var context = FlipedImgCanvas.getContext("2d");
578   - var canvasId = context.canvas.getAttribute('id');
579   -
580   - var mirrorCanvasX = context.canvas.offsetLeft;
581   - var mirrorCanvasWidth = context.canvas.clientWidth;
582   -
583   - var maskCanvasId = (canvasId.replace('_MR', '')) + '_mci';
584   - var maskCanvas = document.getElementById(maskCanvasId);
585   - var canvasContextForRGB = maskCanvas.getContext("2d");
586   -
587   -
588   - var canvasDiv = document.getElementById('canvasDiv');
589   - var verticalScrollPosition = canvasDiv.scrollTop;
590   - var horizontlScrollPosition = canvasDiv.scrollLeft;
591   -
592   - var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
593   -
594   - var mirrorXOnNormalImage = parseInt(canvasContextForRGB.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage);
595   -
596   - var actulalX = mirrorXOnNormalImage
597   - var actualY = mousePos.y + verticalScrollPosition
598   -
599   -
600   -
601   -
602   - var pixelData = canvasContextForRGB.getImageData(Math.round(actulalX - parseInt(canvasContextForRGB.canvas.offsetLeft)), Math.round(actualY - y), 1, 1);
603   -
604   - pixelData.data[0] = pixelData.data[0] - 9;
605   - pixelData.data[1] = pixelData.data[1] - 9;
606   - pixelData.data[2] = pixelData.data[2] - 9
607   -
608   - var Red;
609   - var Green;
610   - var Blue;
611   - var zero = "0";
612   -
613   - if ((pixelData.data[0]).toString().length != 2) {
614   - Red = zero.concat((pixelData.data[0]).toString())
615   - }
616   - else {
617   - Red = (pixelData.data[0]).toString()
618   - }
619   - if ((pixelData.data[1]).toString().length != 2) {
620   - Green = zero.concat((pixelData.data[1]).toString())
621   - }
622   - else {
623   - Green = (pixelData.data[1]).toString()
624   -
625   - }
626   - if ((pixelData.data[2]).toString().length != 2) {
627   - Blue = zero.concat((pixelData.data[2]).toString())
628   - }
629   - else {
630   - Blue = (pixelData.data[2]).toString()
631   -
632   - }
633   - var RGBColor = (Red + Green + Blue);
634   -
635   -
636   - var annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
637   -
638   - if ($('#speechBubble').length > 0) {
639   - $('#speechBubble').remove();
640   -
641   - $scope.createSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
642   -
643   - }
644   - else
645   - $scope.createSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
646   -
647   -
648   -
649   - }, false);
650   -
651   - FlipedImgCanvas.addEventListener('mousedown', function (evt) {
652   -
653   - //alert('mousedown')
654   - }, false);
655   -
656   -
657   - FlipedImgCanvas.addEventListener('mouseup', function (evt) {
658   - //alert('mouseup')
659   -
660   -
661   - }, false);
662   -
663   - var context = FlipedImgCanvas.getContext("2d");
664   -
665   - var PI = Math.PI;
666   - var PI2 = PI * 2;
667   - var cw, ch, imgW, imgH, mouseX, mouseY;
668   - var scaleFactor = 1.00;
669   -
670   - //$scaler = $("#scaler");
671   - //$scaler.val(scaleFactor);
672   - //$scaler.hide();
673   -
674   - var img = new Image();
675   - img.onload = start;
676   -
677   - // img.src = "~/../content/images/" + src;;
678   - img.src = src;
679   - console.log("img.src: " + img.src);
680   - console.log("src: " + src);
681   -
682   -
683   - function start() {
684   - context.save();
685   - context.translate(w, 0);
686   - context.scale(-1, 1);
687   - context.drawImage(img, 0, 0);
688   - context.restore();
689   -
690   -
691   - };
692   -
693   - document.getElementById('canvasDiv').appendChild(FlipedImgCanvas);
694   -
695   -
696   - }
697   -
698   - $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
699   -
700   - var imgCanvas = document.createElement('canvas');
701   - // imgCanvas.style.backgroundColor = 'red';
702   - imgCanvas.height = h;
703   - imgCanvas.width = w;
704   - imgCanvas.setAttribute("data-IsMirrored", "N")
705   - imgCanvas.style.position = "absolute";
706   - imgCanvas.style.left = x + "px";
707   - imgCanvas.style.top = y + "px";
708   - if (isMaskImage == 'Y') {
709   - imgCanvas.style.visibility = 'hidden'
710   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci';
711   -
712   - }
713   - else {
714   - imgCanvas.id = 'imageCanvas' + bodyRegionId;
715   - imgCanvas.style.visibility = 'visible'
716   -
717   - }
718   - imgCanvas.addEventListener('click', function (evt) {
719   -
720   -
721   - // debugger;
722   - var context = imgCanvas.getContext("2d");
723   -
724   -
725   - var canvasId = context.canvas.getAttribute('id');
726   -
727   - var maskCanvasId = canvasId + '_mci';
728   - var maskCanvas = document.getElementById(maskCanvasId);
729   - var canvasContextForRGB = maskCanvas.getContext("2d");
730   -
731   -
732   - var mousePos = $scope.getMousePos(evt);
733   - // alert(mousePos.x + ',' + mousePos.y);
734   -
735   - var canvasDiv = document.getElementById('canvasDiv');
736   - var verticalScrollPosition = canvasDiv.scrollTop;
737   - var horizontlScrollPosition = canvasDiv.scrollLeft;
738   -
739   -
740   - //We substracted 135, as the difference between flex and html coordinates for same organ is 135
741   - var actulalX = mousePos.x + horizontlScrollPosition// - 135;// + leftToolBarWidth;
742   - var actualY = mousePos.y + verticalScrollPosition //- 135; //+ tomenuBarheight + titleBarheight + searchComboheight;
743   -
744   -
745   -
746   - var pixelData = canvasContextForRGB.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1);
747   -
748   - pixelData.data[0] = pixelData.data[0] - 9;
749   - pixelData.data[1] = pixelData.data[1] - 9;
750   - pixelData.data[2] = pixelData.data[2] - 9;
751   - var Red;
752   - var Green;
753   - var Blue;
754   - var zero = "0";
755   -
756   - if ((pixelData.data[0]).toString().length != 2) {
757   - Red = zero.concat((pixelData.data[0]).toString())
758   - }
759   - else {
760   - Red = (pixelData.data[0]).toString()
761   - }
762   - if ((pixelData.data[1]).toString().length != 2) {
763   - Green = zero.concat((pixelData.data[1]).toString())
764   - }
765   - else {
766   - Green = (pixelData.data[1]).toString()
767   -
768   - }
769   - if ((pixelData.data[2]).toString().length != 2) {
770   - Blue = zero.concat((pixelData.data[2]).toString())
771   - }
772   - else {
773   - Blue = (pixelData.data[2]).toString()
774   -
775   - }
776   - var RGBColor = (Red + Green + Blue);
777   -
778   -
779   - var annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
780   -
781   - if ($('#speechBubble').length > 0) {
782   - $('#speechBubble').remove();
783   -
784   - $scope.createSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
785   -
786   - }
787   - else
788   - $scope.createSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
789   -
790   -
791   - }, false);
792   -
793   -
794   -
795   -
796   - var PI = Math.PI;
797   - var PI2 = PI * 2;
798   - var cw, ch, imgW, imgH, mouseX, mouseY;
799   - var scaleFactor = 1.00;
800   -
801   - //$scaler = $("#scaler");
802   - //$scaler.val(scaleFactor);
803   - //$scaler.hide();
804   -
805   - var context = imgCanvas.getContext('2d');
806   - var img = new Image();
807   - img.onload = start;
808   -
809   - img.src = src;
810   - // img.src = img.src = "~/../content/images/" + src;
811   - console.log("img.src: " + img.src);
812   - console.log("src: " + src);
813   -
814   -
815   -
816   - function start() {
817   -
818   - context.drawImage(img, 0, 0);
819   - };
820   - $('#daLoaderLabel').css('visibility', 'visible')
821   - document.getElementById('canvasDiv').appendChild(imgCanvas);
822   -
823   - }
824   -
825   - //get annotation from term number
826   - $scope.GetAnnotationText = function (termNumber) {
827   - // debugger;
828   -
829   - var annotationText;
830   - //0
831   - var figLeafTermNo = 5868; // to do declare constant for this
832   -
833   - if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
834   - $scope.TermNumber = termNumber;
835   - $scope.matchedTermNoData = new jinqJs()
836   - .from($scope.TermNumberData.TermData.Term)
837   - .where('_TermNumber == ' + termNumber)
838   - .select();
839   - //1.
840   - var actualTermNo = 0;
841   - for (var z = 0; z <= $scope.matchedTermNoData.length; z++) {
842   - //send actual term no to get the term text.
843   - actualTermNo = $scope.matchedTermNoData[0]._ActualTermNumber;
844   - annotationText = $scope.GetAnnotationBasedOnActualTermNo(actualTermNo);
845   - break;
846   - };
847   -
848   - //2.
849   -
850   - }
851   - else {
852   - // send term no to vocab json data to get the text
853   - }
854   - return annotationText;
855   - }
856   -
857   - $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) {
858   - // debugger;
859   -
860   - var Annotation;
861   - $scope.ActualTermNo = actualTermNo;
862   -
863   - $scope.matchedActualTermData = new jinqJs()
864   - .from($scope.VocabTermData.VocabTerms.Term)
865   - .where('_ActualTermNumber == ' + actualTermNo)
866   - .select();
867   - for (var z = 0; z <= $scope.matchedActualTermData.length; z++) {
868   - //send actual term no to get the term text.
869   - Annotation = $scope.matchedActualTermData[0]._TermText;
870   - // alert("Annotation : " + Annotation);
871   - break;
872   - };
873   - return Annotation;
874   - }
875   -
876   -
877   - //layer change function
878   - $scope.LayerChange = function () {
879   -
880   - var canvasDiv = document.getElementById('canvasDiv');
881   - $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
882   - $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
883   -
884   -
885   - $('#daLoaderLabel').css('visibility', 'visible')
886   - var canDiv = document.getElementById('canvasDiv');
887   - var canDivChildCount = canDiv.childElementCount;
888   - if (canDivChildCount > 0) {
889   - canDiv.innerHTML = '';
890   - }
891   -
892   - $scope.CalculateImageCordinates($scope.voId);
893   -
894   -
895   - $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
896   - $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition)
897   -
898   - }
899   -
900   - //called on jspanel close
901   - $scope.openParent = function () {
902   - // debugger;
903   - var openViews = $rootScope.openViews;
904   - if (openViews.length > 0) {
905   - $rootScope.openViews.splice(openViews.length - 1);
906   - }
907   - if (openViews.length > 0) {
908   - var lastOpenMoudle = $rootScope.openViews[openViews.length - 1];
909   - }
910   - $('#daImagePanel').remove();
911   - $location.url('/da-view-list');
912   - }
913   -
914   - //called on jsanel minimize
915   - $scope.setState = function (state, title) {
916   - //debugger;
917   -
918   -
919   - var alreadyOpenThisView = new jinqJs()
920   - .from($rootScope.openViews)
921   - .where("BodyView == " + title)
922   - .select();
923   - var k = 0;
924   - if (alreadyOpenThisView != null) {
925   - for (var i = 0; i < $rootScope.openViews.length; i++) {
926   - k++;
927   - if ($rootScope.openViews[i].BodyView == title) {
928   - $rootScope.openViews.splice((k - 1), 1);
929   -
930   - $rootScope.openViews.push(
931   - {
932   - "module": $rootScope.currentActiveModuleTitle, "BodyView": title, "state": state, "BodyViewId": $rootScope.currentBodyViewId,
933   - "slug": $rootScope.currentSlug
934   - }
935   - );
936   - }
937   - }
938   - }
939   -
940   - }
941   -
942   - $scope.changeLayer = function () {
943   - console.log('changeLayer');
944   - // alert('slide')
945   - }
946   -
947   - $('layerChangeSlider').slider().on('slideStop', function (ev) {
948   - alert('slide')
949   - var newVal = $('.span2').data('slider').getValue();
950   - if (originalVal != newVal) {
951   - alert('Value Changed!');
952   - }
953   - });
954   -
955   -
956   - $scope.getMousePos = function (evt) {
957   -
958   - return {
959   - x: Math.round(evt.pageX - $('#canvasDiv').offset().left),
960   - y: Math.round(evt.pageY - $('#canvasDiv').offset().top)
961   - }
962   - }
963   -
964   -
965   - $scope.createSpeechBubble = function (event, text, x, y) {
966   -
967   - $('#canvasDiv').css('cursor', 'pointer');
968   - $('<div id="speechBubble" class="BubbleDiv" style="display:visible; top:' + y + 'px; left:' + x + 'px;"> <div class="">'
969   - + '<div class="Bubble">'
970   - + '<div class="BubbleCloseBtn"></div><div class="BubbleContent">' + text + '</div><div class="bottomLeftArrow"></div>'
971   - //+'<div class="bottomRightArrow"></div><div class="topLeftArrow"></div><div class="topRightArrow"></div>
972   - + '</div></div></div>').appendTo('#canvasDiv');
973   -
974   - $('#speechBubble').on('click', '.BubbleCloseBtn', function (e) {
975   - $('#speechBubble').css('display', 'none');
976   - });
977   -
978   - $('#canvasDiv').attr("data-bubbleid", "speechBubble")
979   -
980   -
981   - };
982   -
983   - $scope.createSpeechBubbleOnTransparencyBox = function (event, text1, text2, x, y) {
984   -
985   - $('#canvasDiv').css('cursor', 'pointer');
986   - $('<div id="speechBubbleTrns" class="BubbleDiv" style="display:visible; top:' + y + 'px; left:' + x + 'px;"> <div class="">'
987   - + '<div class="Bubble">'
988   - + '<div class="BubbleCloseBtn"></div><div class="BubbleContent">' + text1 + '</div><div class="BubbleContent">' + text2 + '</div><div class="bottomLeftArrow"></div>'
989   - //+'<div class="bottomRightArrow"></div><div class="topLeftArrow"></div><div class="topRightArrow"></div>
990   - + '</div></div></div>').appendTo('#canvasDiv');
991   -
992   - $('#speechBubbleTrns').on('click', '.BubbleCloseBtn', function (e) {
993   - $('#speechBubbleTrns').css('display', 'none');
994   - });
995   -
996   - $('#canvasDiv').attr("data-bubbleid", "speechBubble")
997   -
998   -
999   - };
1000   -
1001   -
1002   - function positionTooltip(event, x, y) {
1003   - // alert('positionTooltip')
1004   - x = 100,
1005   - y = 200,
1006   -
1007   - $('div.speech-bubble').css({
1008   - 'position': 'absolute', 'top': x, 'left': y, 'background-color': '#f8f8f8',
1009   - 'border': '2px solid #c8c8c8', 'width': '150px', 'height': '50px'
1010   - });
1011   -
1012   -
1013   - $('.arrow').css({
1014   - 'border-style': 'solid',
1015   - 'position': 'absolute'
1016   - });
1017   -
1018   - $('.bottom').css({
1019   - 'border-color': '#c8c8c8 transparent transparent transparent',
1020   - 'border-width': ' 8px 8px 0px 8px',
1021   - 'bottom': -'8px'
1022   - })
1023   - };
1024   -
1025   -
1026   -
1027   -}]
1028   -
1029   -);
1030   -
1031   -//DAController.$inject = ["$scope", "$rootScope", "$q", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "GetJsonService"];
400-SOURCECODE/AIAHTML5.Web/index.html
1 1 <!DOCTYPE html>
2 2 <html lang="en" ng-cloak ng-app="AIA">
3 3 <head>
4   - <base href="/AIAHTML5/" />
  4 + <base href="/AIA/" />
5 5 <meta charset="utf-8">
6 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
... ...
400-SOURCECODE/AIAHTML5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache 0 → 100644
No preview for this file type