Commit 5fe52b053dff01fcc56266ec1d779ac4bda756b1

Authored by Amit Kumar
2 parents 7f38cf27 414afdff

Merge branch 'Develop' of http://52.6.196.163/ADAM/AIAHTML5 into Test_stash

400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -14,6 +14,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
14 14 $scope.filterstring = false;
15 15 $scope.hostedServer = "http://aia5.adam.com/graphics/Multimedia/en/";
16 16 $scope.hostedFolderId;
  17 + $scope.idSelected;
17 18 $scope.query = {
18 19 selectedbodyregion: '',
19 20 selectedbodysystem: '',
... ... @@ -39,13 +40,31 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
39 40 //set the local storage
40 41  
41 42 var curtab = localStorage.getItem("currentCATabView");
  43 + //if (curtab == 2) {
  44 + // $scope.setActiveTab(2);
  45 + //}
42 46 if (curtab == 2) {
43 47 $scope.setActiveTab(2);
  48 + var curSelectedRowId = localStorage.getItem("CASelectedRowId");
  49 + if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
  50 + $scope.reRunSearchOnLoad();
  51 + $scope.idSelected = curSelectedRowId;
  52 + $scope.ReloadListViewImageDiv($scope.idSelected);
  53 + }
  54 + else {
  55 + $scope.reRunSearchOnLoad()
  56 + $scope.idSelected = '';
  57 + }
44 58 }
45 59 else {
46 60 $scope.setActiveTab(1);
47 61 }
48 62  
  63 + $scope.reRunSearchOnLoad();
  64 +
  65 + });
  66 +
  67 + $scope.reRunSearchOnLoad = function () {
49 68 var curBodyRegion = localStorage.getItem("CACurBodyRegion");
50 69 if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') {
51 70 $scope.query.selectedbodyregion = curBodyRegion;
... ... @@ -76,10 +95,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
76 95 }
77 96 else {
78 97 $scope.ApplySearch($scope.query);
79   - }
80 98  
81   -
82   - });
  99 + }
  100 + }
83 101  
84 102 $scope.LoadCAJsonData = function () {
85 103  
... ... @@ -159,6 +177,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
159 177  
160 178 $scope.showItem = function (id) {
161 179 //console.log(id);
  180 + $scope.idSelected = id;
  181 + localStorage.setItem("CASelectedRowId", id);
  182 +
  183 + //Set the vertical scroll value of the table.
  184 + var y = $('#ListViewDiv').scrollTop();
  185 + localStorage.setItem("CAListViewScroll", y);
  186 +
162 187 $scope.hiderow = true;
163 188 if ($scope.filterstring == false) {
164 189  
... ... @@ -200,15 +225,30 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
200 225 query.selectedspecialty = "";
201 226  
202 227 //set localstorage values
203   - localStorage.setItem("CACurBodyRegion", query.selectedbodyregion);
204   - localStorage.setItem("CACurBodySystem", query.selectedbodysystem);
205   - localStorage.setItem("CACurSpeciality", query.selectedspecialty);
  228 + localStorage.setItem("CACurBodyRegion", '');
  229 + localStorage.setItem("CACurBodySystem", '');
  230 + localStorage.setItem("CACurSpeciality", '');
  231 + localStorage.setItem("CAListViewScroll", '');
  232 + localStorage.setItem("CASelectedRowId", "");
206 233  
207 234 $scope.filterstring = false;
  235 +
  236 + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
  237 +
  238 + $('#ListViewDiv').scrollTop(0);
  239 +
  240 + $scope.HideListViewDiv();
  241 +
  242 +
208 243 while ($scope.searchCAListViewData.length) {
209 244 $scope.searchCAListViewData.pop();
210 245 }
211 246  
  247 + if (localStorage.getItem("currentCATabView") == 2) {
  248 + localStorage.setItem("CASelectedRowId", "");
  249 + $scope.hiderow = false;
  250 + }
  251 +
212 252 $scope.loadAllCA();
213 253  
214 254 }
... ... @@ -372,7 +412,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
372 412  
373 413 $scope.openView = function ($event) {
374 414 $rootScope.disableAnnotationTBFn();
375   -
  415 + $rootScope.MenuModuleName = "CA";
  416 + //alert($rootScope.MenuModuleName);
376 417 $rootScope.currentBodyViewId = $event.currentTarget.id;
377 418 if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") {
378 419 var CITitle = [];
... ... @@ -544,6 +585,58 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
544 585 $scope.videoNumber = vidNumber;
545 586 };
546 587  
  588 + $scope.ReloadListViewImageDiv = function (id) {
  589 + //console.log(id);
  590 + $scope.idSelected = id;
  591 + $scope.hiderow = true;
  592 +
  593 + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json')
  594 + promise.then(
  595 + function (result) {
  596 + $scope.AnimationData = result;
  597 + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData;
  598 +
  599 + var SelectedCAthumbImage = [];
  600 + SelectedCAthumbImage = new jinqJs()
  601 + .from($scope.AnimationData.root.CAData)
  602 + .where('_id = ' + id)
  603 + .select('_ThumbnailImage', '_Summary', '_id', '_Title');
  604 +
  605 + //console.log($scope.selectedCAListViewData);
  606 +
  607 + $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage;
  608 +
  609 + $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary;
  610 + $scope.SelectedCAId = SelectedCAthumbImage[0]._id;
  611 + $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title;
  612 +
  613 + //Set the scroll position of the tablebody to show selected row.
  614 +
  615 + var curCAListViewScroll = localStorage.getItem("CAListViewScroll");
  616 + if (typeof (curCAListViewScroll) !== "undefined" && curCAListViewScroll !== null && curCAListViewScroll !== '') {
  617 +
  618 + $('#ListViewDiv').scrollTop(localStorage.getItem("CAListViewScroll"));
  619 + }
  620 + //else {
  621 + // $('#ListViewDiv').scrollTop(0);
  622 + //}
  623 +
  624 + },
  625 + function (error) {
  626 + // handle errors here
  627 + console.log(' $scope.AnimationData = ' + error.statusText);
  628 + }
  629 + );
  630 + };
  631 +
  632 + $scope.hideListViewDiv = function () {
  633 + if (localStorage.getItem("currentCATabView") == 2) {
  634 + localStorage.setItem("CASelectedRowId", "");
  635 + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
  636 + $scope.hiderow = false;
  637 + }
  638 + }
  639 +
547 640  
548 641 }]
549 642  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... ... @@ -16,6 +16,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
16 16 $scope.SelectedCITitle = [];
17 17 $scope.selectedCIListViewData = [];
18 18 $scope.filterstring = false;
  19 + $scope.idSelected;
  20 + $scope.srollListView;
19 21 $scope.query = {
20 22 selectedbodyregion: '',
21 23 selectedbodysystem: '',
... ... @@ -49,13 +51,29 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
49 51 var curtab = localStorage.getItem("currentCITabView");
50 52 if (curtab == 2) {
51 53 $scope.setActiveTab(2);
  54 + var curSelectedRowId = localStorage.getItem("CISelectedRowId");
  55 + if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
  56 + $scope.reRunSearchOnLoad();
  57 + $scope.idSelected = curSelectedRowId;
  58 + $scope.ReloadListViewImageDiv($scope.idSelected);
  59 + }
  60 + else {
  61 + $scope.reRunSearchOnLoad()
  62 + $scope.idSelected = '';
  63 + }
52 64 }
53 65 else {
54 66 $scope.setActiveTab(1);
55 67 }
56 68  
  69 + $scope.reRunSearchOnLoad();
  70 +
  71 + });
  72 +
  73 + $scope.reRunSearchOnLoad = function () {
  74 +
57 75 var curBodyRegion = localStorage.getItem("CICurBodyRegion");
58   - if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') {
  76 + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') {
59 77 $scope.query.selectedbodyregion = curBodyRegion;
60 78 }
61 79 else {
... ... @@ -63,7 +81,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
63 81 }
64 82  
65 83 var curBodySystem = localStorage.getItem("CICurBodySystem");
66   - if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') {
  84 + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') {
67 85 $scope.query.selectedbodysystem = curBodySystem;
68 86 }
69 87 else {
... ... @@ -71,7 +89,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
71 89 }
72 90  
73 91 var curOrientation = localStorage.getItem("CICurOrientation");
74   - if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !=='') {
  92 + if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') {
75 93 $scope.query.selectedorientation = curOrientation;
76 94 }
77 95 else {
... ... @@ -79,7 +97,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
79 97 }
80 98  
81 99 var curImageType = localStorage.getItem("CICurImageType");
82   - if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !=='') {
  100 + if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') {
83 101 $scope.query.selectedimagetype = curImageType;
84 102 }
85 103 else {
... ... @@ -87,7 +105,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
87 105 }
88 106  
89 107 var curSpeciality = localStorage.getItem("CICurSpeciality");
90   - if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !=='') {
  108 + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') {
91 109 $scope.query.selectedspecialty = curSpeciality;
92 110 }
93 111 else {
... ... @@ -102,7 +120,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
102 120 $scope.ApplySearch($scope.query);
103 121 }
104 122  
105   - });
  123 + }
106 124  
107 125 $scope.LoadCIJsonData = function () {
108 126  
... ... @@ -110,8 +128,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
110 128 promise.then(
111 129 function (result) {
112 130 $scope.IllustrationData = result;
113   - //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData;
114   -
115 131 $scope.selectedCIListViewData = new jinqJs()
116 132 .from($scope.IllustrationData.root.CIData)
117 133 .orderBy([{ field: '_Title', sort: 'asc' }])
... ... @@ -133,7 +149,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
133 149 promise.then(
134 150 function (result) {
135 151 $scope.IllustrationData = result;
136   - //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData;
137 152  
138 153 $scope.selectedCIListViewData = new jinqJs()
139 154 .from($scope.IllustrationData.root.CIData)
... ... @@ -175,7 +190,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
175 190 }
176 191  
177 192 $scope.showItem = function (id) {
178   - // console.log(id);
  193 + $scope.idSelected = id;
  194 + localStorage.setItem("CISelectedRowId", id);
  195 +
  196 + //Set the vertical scroll value of the table.
  197 + var y = $('#ListViewDiv').scrollTop();
  198 + localStorage.setItem("CIListViewScroll", y);
  199 +
179 200 $scope.hiderow = true;
180 201 if ($scope.filterstring == false) {
181 202  
... ... @@ -219,11 +240,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
219 240  
220 241  
221 242 //set localstorage values
222   - localStorage.setItem("CICurBodyRegion", query.selectedbodyregion);
223   - localStorage.setItem("CICurBodySystem", query.selectedbodysystem);
224   - localStorage.setItem("CICurOrientation", query.selectedorientation);
225   - localStorage.setItem("CICurImageType", query.selectedimagetype);
226   - localStorage.setItem("CICurSpeciality", query.selectedspecialty);
  243 + localStorage.setItem("CICurBodyRegion", '');
  244 + localStorage.setItem("CICurBodySystem", '');
  245 + localStorage.setItem("CICurOrientation", '');
  246 + localStorage.setItem("CICurImageType", '');
  247 + localStorage.setItem("CICurSpeciality", '');
  248 + localStorage.setItem("CISelectedRowId", "");
  249 + localStorage.setItem("CIListViewScroll", '');
  250 +
  251 + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
  252 +
  253 + $('#ListViewDiv').scrollTop(0);
  254 +
  255 + $scope.HideListViewDiv();
227 256  
228 257 $scope.filterstring = false;
229 258 while ($scope.searchCIListViewData.length) {
... ... @@ -290,7 +319,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
290 319 promise.then(
291 320 function (result) {
292 321 $scope.IllustrationData = result;
293   - //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData;
294 322  
295 323 $scope.selectedCIListViewData = new jinqJs()
296 324 .from($scope.IllustrationData.root.CIData)
... ... @@ -594,6 +622,54 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
594 622 // $rootScope.FreeStylePaint();
595 623 });
596 624  
  625 + $scope.ReloadListViewImageDiv = function (id) {
  626 + //console.log(id);
  627 + $scope.idSelected = id;
  628 + $scope.hiderow = true;
  629 +
  630 + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json')
  631 + promise.then(
  632 + function (result) {
  633 + $scope.IllustrationData = result;
  634 +
  635 + var SelectedCIthumbImage = [];
  636 + SelectedCIthumbImage = new jinqJs()
  637 + .from($scope.IllustrationData.root.CIData)
  638 + .where('_id = ' + id)
  639 + .select('_ThumbnailImage', '_Summary', '_id', '_Title');
  640 +
  641 + $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage;
  642 + $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary;
  643 + $scope.SelectedCIId = SelectedCIthumbImage[0]._id;
  644 + $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title;
  645 +
  646 + //Set the scroll position of the tablebody to show selected row.
  647 +
  648 + var curCIListViewScroll = localStorage.getItem("CIListViewScroll");
  649 + if (typeof (curCIListViewScroll) !== "undefined" && curCIListViewScroll !== null && curCIListViewScroll !== '') {
  650 +
  651 + $('#ListViewDiv').scrollTop(localStorage.getItem("CIListViewScroll"));
  652 + }
  653 + //else {
  654 + // $('#ListViewDiv').scrollTop(0);
  655 + //}
  656 +
  657 + },
  658 + function (error) {
  659 + // handle errors here
  660 + console.log(' $scope.AnimationData = ' + error.statusText);
  661 + }
  662 + );
  663 + };
  664 +
  665 + $scope.hideListViewDiv = function () {
  666 + if (localStorage.getItem("currentCITabView") == 2) {
  667 + localStorage.setItem("CISelectedRowId", "");
  668 + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
  669 + $scope.hiderow = false;
  670 + }
  671 + }
  672 +
597 673 }]
598 674  
599 675  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -266,6 +266,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
266 266  
267 267 $scope.openView = function ($event) {
268 268 $rootScope.disableAnnotationTB = false;
  269 + $rootScope.MenuModuleName = "DA";
  270 + //alert($rootScope.MenuModuleName);
269 271 $rootScope.isLoading = true;
270 272 $('#spinner').css('visibility', 'visible');
271 273  
... ... @@ -470,7 +472,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
470 472 url: 'app/views/da/da-view.html'
471 473 },
472 474 title: localStorage.getItem("currentViewTitle"),
473   -
  475 +
474 476 position: {
475 477 top: 70,
476 478 left: 1,
... ... @@ -480,6 +482,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
480 482  
481 483 });
482 484  
  485 + console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel'))
483 486 //0.1
484 487 $rootScope.currentSlug = 'da-body-view';
485 488  
... ... @@ -494,41 +497,69 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
494 497 //0.3
495 498 var daBodyviewElement = angular.element(document.getElementById("daBodyview"));
496 499  
497   - $timeout(function () { $compile(daBodyviewElement.contents())($scope) }, 250);
  500 + $timeout(function () {
  501 + $compile(daBodyviewElement.contents())($scope);
498 502  
  503 + console.log('html is compiled' + document.getElementById('daView'))
  504 + if (document.getElementById('daView') != null) {
499 505  
500   - //0.4 added some stylesheets
501   - $('#daBodyview').css("height", $(window).outerHeight());
  506 + //0.4 added some stylesheets
  507 + $('#daBodyview').css("height", $(window).outerHeight());
502 508  
503   - $('#daBodyview').css("width", $(window).outerWidth());
  509 + $('#daBodyview').css("width", $(window).outerWidth());
504 510  
505   - //1. load navigator man first
506   - $scope.LoadBodyViewNavigatorImage();
  511 + //1. load navigator man first
  512 + console.log('before LoadBodyViewNavigatorImage call')
  513 + $scope.LoadBodyViewNavigatorImage();
507 514  
508   - //$scope.loadSearchDataForBodyView();
  515 + //$scope.loadSearchDataForBodyView();
509 516  
510   - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
  517 + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
511 518  
512   - $scope.layerNumber = 0;
  519 + $scope.layerNumber = 0;
513 520  
514   - //2.
  521 + //2.
515 522  
516   - console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
517   - $scope.loadBodyViewData(currentBodyViewId);
  523 + console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
  524 + $scope.loadBodyViewData(currentBodyViewId);
518 525  
519   - //2. load bodyRegion data
520   - $rootScope.isLoading = true;
521   - $rootScope.voId = localStorage.getItem("currentBodyViewId");
  526 + //2. load bodyRegion data
  527 + $rootScope.isLoading = true;
  528 + $rootScope.voId = localStorage.getItem("currentBodyViewId");
522 529  
523   - $('#daBodyview').css("height", $(window).outerHeight());
  530 + $('#daBodyview').css("height", $(window).outerHeight());
524 531  
525   - $('#daBodyview').css("width", $(window).outerWidth());
  532 + $('#daBodyview').css("width", $(window).outerWidth());
  533 + }
  534 + }, 250);
526 535 }
527 536  
528   - angular.element(document).ready(function () {
529   -
530   - })
  537 + angular.element(document).ready(function (e) {
  538 + $("#daImagePanel").resize(function () {
  539 + $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition);
  540 + $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition);
  541 + });
531 542  
  543 + $(document).on("mouseover", "#termList option", function (e) {
  544 + $('#termList option[selected="selected"]').attr("selected", false);
  545 + $(this).attr("selected", true);
  546 + });
  547 +
  548 + $(document).keypress(function (e) {
  549 + if ($('#termList option[selected="selected"]').attr("id") == "undefined") {
  550 + return false;
  551 + }
  552 + else {
  553 + var originator = e.keyCode || e.which;
  554 + // alert($('#termList option[selected="selected"]').attr("id"));
  555 + if ($('#termList option[selected="selected"]').attr("id")) {
  556 + if (e.keyCode == 13) {
  557 + onListManagerTermSelection($('#termList option[selected="selected"]').attr("id"));
  558 + }
  559 + }
  560 + }
  561 + });
  562 + })
532 563  
533 564 $scope.loadSearchDataForBodyView = function () {
534 565  
... ... @@ -630,6 +661,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
630 661  
631 662 //Code for displaying NavigatorImage for BodyView
632 663 $scope.LoadBodyViewNavigatorImage = function () {
  664 + console.log('insideLoadBodyViewNavigatorImage')
633 665 var NavigatorManJsonPath = '~/../content/data/json/da/da_dat_orient_image.json';
634 666  
635 667 $http({ method: 'GET', url: NavigatorManJsonPath })
... ... @@ -696,7 +728,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
696 728  
697 729  
698 730 $scope.LoadDefaultLayerImage = function () {
699   -
  731 + console.log('inside LoadDefaultLayerImage')
700 732 $rootScope.isNormalMode = true;
701 733  
702 734 $scope.layerNumber = 0;
... ... @@ -740,13 +772,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
740 772  
741 773 $rootScope.isLoading = true;
742 774 $('#spinner').css('visibility', 'visible');
743   -
  775 + $scope.modestyImageInfo = [];
744 776 // annotation toolbar canvas
745 777 if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {
746 778  
747 779 $("#canvasDiv").append('<canvas id="canvasPaint" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" width="2277" height="3248" class="canvas-annotationStyle"></canvas>');
748   - $scope.BindCanvasDrawingListners();
749   - // $rootScope.FreeStylePaint();
  780 + $scope.BindCanvasDrawingListners();
  781 + // $rootScope.FreeStylePaint();
750 782  
751 783 }
752 784  
... ... @@ -775,8 +807,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
775 807 $rootScope.BodyRegionCordinatesData = []; // create an empty array
776 808  
777 809 $('#daBodyview').css('width', '100%');
778   - $('#canvasDiv').css('height', $('#daImagePanel').outerHeight() - 104)
779   - //$('#canvasDiv').css('width', $('#daImagePanel').outerWidth() - 100)
  810 + var canvasDIvHeight = parseInt($('#daImagePanel').outerHeight()) - 104;
  811 + $('#canvasDiv').css('height', canvasDIvHeight);
780 812 $('#leftToolBar').css('height', $('#daImagePanel').outerHeight())
781 813  
782 814  
... ... @@ -1368,7 +1400,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1368 1400 }
1369 1401 }
1370 1402  
1371   - // $rootScope.previousHighlightList.push(RGBColor);
  1403 + // $rootScope.previousHighlightList.push(RGBColor);
1372 1404  
1373 1405 $scope.highLightBodyBasedOnIcolor(RGBColor);
1374 1406 }
... ... @@ -1380,7 +1412,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1380 1412 //}
1381 1413  
1382 1414 //extarct clicked body part is extarct button is already enabled.
1383   - // debugger;
  1415 + // debugger;
1384 1416 if ($rootScope.isExtract == true) {
1385 1417 $scope.enableExtract(false);
1386 1418 }
... ... @@ -1503,7 +1535,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1503 1535  
1504 1536 // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
1505 1537  
1506   - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
  1538 + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
1507 1539  
1508 1540 if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
1509 1541 $scope.isEligibleForHighlight = true;
... ... @@ -1741,7 +1773,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1741 1773 }
1742 1774 }
1743 1775  
1744   - // $rootScope.previousHighlightList.push(RGBColor);
  1776 + // $rootScope.previousHighlightList.push(RGBColor);
1745 1777  
1746 1778  
1747 1779 if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { }
... ... @@ -1756,7 +1788,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1756 1788 // $rootScope.previousHighlightList.push(RGBColor);
1757 1789 //}
1758 1790  
1759   - // debugger;
  1791 + // debugger;
1760 1792 //extarct clisked body part is extarct button is already enabled.
1761 1793 if ($rootScope.isExtract == true) {
1762 1794 $scope.enableExtract(false);
... ... @@ -1833,7 +1865,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1833 1865  
1834 1866 if (isMaskImage == 'N') {
1835 1867 if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
1836   - //do nothing
  1868 + $scope.modestyImageInfo.push(
  1869 +
  1870 + {
  1871 + "bodyRegionId": bodyRegionId, "SRC": src,
  1872 + "Height": h,
  1873 + "Width": w,
  1874 + "x": x,
  1875 + "y": y,
  1876 + "haveMirror": 'false'
  1877 + }
  1878 +
  1879 + );
1837 1880 }
1838 1881 else {
1839 1882  
... ... @@ -1912,6 +1955,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1912 1955 console.log('just after highLightBody call');
1913 1956  
1914 1957 }
  1958 + else {
  1959 + $rootScope.isLoading = false;
  1960 + $('#spinner').css('visibility', 'hidden');
  1961 + }
1915 1962 }
1916 1963 else {
1917 1964 $rootScope.isLoading = false;
... ... @@ -2207,7 +2254,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2207 2254 $scope.aligneCanvasWithTerm()
2208 2255 }
2209 2256  
2210   - // $timeout(function () { $scope.DisableProgressBar() }, 1000);
  2257 + // $timeout(function () { $scope.DisableProgressBar() }, 1000);
2211 2258  
2212 2259  
2213 2260  
... ... @@ -2223,16 +2270,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2223 2270 }
2224 2271  
2225 2272 $scope.HighlightBodyByTermList = function (TermList) {
2226   -
2227   - //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) {
2228   - // $rootScope.updatedGrayMRDataList = null;
2229   - // $rootScope.updatedGrayMRDataList = [];
2230   - //}
2231   - //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) {
2232   - // $rootScope.updatedGrayDataList = null;
2233   - // $rootScope.updatedGrayDataList = [];
2234   - //}
2235   -
  2273 +
2236 2274 $scope.layerNumber = $('#txtlayerNumber').val();
2237 2275  
2238 2276 $rootScope.isLoading = true;
... ... @@ -2425,7 +2463,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2425 2463 console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length)
2426 2464  
2427 2465 if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) {
2428   -
  2466 +
2429 2467 if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.highlightedBR.length == 9)) {
2430 2468 $scope.doAligneCanvasWithTerm = true;
2431 2469 }
... ... @@ -2438,7 +2476,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2438 2476 else if ((($rootScope.viewOrientationId == '6')) && ($scope.highlightedBR.length == 1)) {
2439 2477 $scope.doAligneCanvasWithTerm = true;
2440 2478 }
2441   -
2442 2479 if ($scope.doAligneCanvasWithTerm == true) {
2443 2480  
2444 2481 if ($rootScope.isListManagerSelected == true)
... ... @@ -2450,8 +2487,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2450 2487  
2451 2488 $('#spinner').css('visibility', 'hidden');
2452 2489 }
  2490 + else {
  2491 + var canvasDiv = document.getElementById('canvasDiv');
  2492 + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition);
  2493 + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition);
  2494 +
  2495 + $rootScope.isLoading = false;
  2496 +
  2497 + $('#spinner').css('visibility', 'hidden');
  2498 + //$('#canvasDiv').scrollLeft(newX);
  2499 + //$('#canvasDiv').scrollTop(newY);
  2500 + }
2453 2501  
2454   - // $rootScope.isHighlightBodyByBodySystem = false;
  2502 + // $rootScope.isHighlightBodyByBodySystem = false;
2455 2503  
2456 2504  
2457 2505 }
... ... @@ -2647,46 +2695,46 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2647 2695  
2648 2696 var tCanvas = document.getElementById('transparencyCanvas');
2649 2697  
2650   - var tCanvasContext = tCanvas.getContext('2d');
  2698 + var tCanvasContext = tCanvas.getContext('2d');
2651 2699  
2652   - var tCanvasHeight = parseInt((tCanvas.style.height).replace('px', ''));
  2700 + var tCanvasHeight = parseInt((tCanvas.style.height).replace('px', ''));
2653 2701  
2654   - var tCanvasWidth = parseInt((tCanvas.style.width).replace('px', ''));
  2702 + var tCanvasWidth = parseInt((tCanvas.style.width).replace('px', ''));
2655 2703  
2656 2704  
2657   - // var tCanvas = document.getElementById('transparencyCanvas');
2658   - if (tCanvas != null) {
2659   - clearTransCanvas();
2660   - }
2661   - var TransparencyBoxStartX = parseInt((tCanvas.style.left).replace('px', ''));
2662   - var TransparencyEndX = parseInt((tCanvas.style.left).replace('px', '')) + parseInt((tCanvas.style.width.replace('px', '')));
2663   - var TransparencyBoxStartY = parseInt((tCanvas.style.top).replace('px', ''));
2664   - var TransparencyBoxEndY = parseInt((tCanvas.style.top).replace('px', '')) + parseInt((tCanvas.style.height).replace('px', ''));
2665   - var transparencyBoxBottom = parseInt(TransparencyBoxStartY) + parseInt(tCanvasHeight);
2666   - var transparencyBoxRight = parseInt(TransparencyBoxStartX) + parseInt(tCanvasWidth);
  2705 + // var tCanvas = document.getElementById('transparencyCanvas');
  2706 + if (tCanvas != null) {
  2707 + clearTransCanvas();
  2708 + }
  2709 + var TransparencyBoxStartX = parseInt((tCanvas.style.left).replace('px', ''));
  2710 + var TransparencyEndX = parseInt((tCanvas.style.left).replace('px', '')) + parseInt((tCanvas.style.width.replace('px', '')));
  2711 + var TransparencyBoxStartY = parseInt((tCanvas.style.top).replace('px', ''));
  2712 + var TransparencyBoxEndY = parseInt((tCanvas.style.top).replace('px', '')) + parseInt((tCanvas.style.height).replace('px', ''));
  2713 + var transparencyBoxBottom = parseInt(TransparencyBoxStartY) + parseInt(tCanvasHeight);
  2714 + var transparencyBoxRight = parseInt(TransparencyBoxStartX) + parseInt(tCanvasWidth);
2667 2715  
2668   - var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
  2716 + var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
2669 2717  
2670   - $.each(BodyRegionDictionary, function (index, value) {
2671   - //debugger;
2672   - // alert(' $.each(BodyRegionDictionary1')
  2718 + $.each(BodyRegionDictionary, function (index, value) {
  2719 + //debugger;
  2720 + // alert(' $.each(BodyRegionDictionary1')
2673 2721  
2674   - var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
2675   - var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
  2722 + var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
  2723 + var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
2676 2724  
2677 2725  
2678   - // alert(' $.each(BodyRegionDictionary3. bodyRegionRight: ' + bodyRegionRight + ', bodyRegionBottom: ' + bodyRegionBottom)
2679   - if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
2680   - //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value);
2681   - // debugger;
2682   - $scope.layerNumber = parseInt(txtlayerNumber.value);
  2726 + // alert(' $.each(BodyRegionDictionary3. bodyRegionRight: ' + bodyRegionRight + ', bodyRegionBottom: ' + bodyRegionBottom)
  2727 + if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
  2728 + //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value);
  2729 + // debugger;
  2730 + $scope.layerNumber = parseInt(txtlayerNumber.value);
2683 2731  
2684 2732  
2685   - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false);
2686   - }
  2733 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false);
  2734 + }
2687 2735  
2688 2736  
2689   - })
  2737 + })
2690 2738  
2691 2739 }
2692 2740  
... ... @@ -2744,10 +2792,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2744 2792 if ($("#txtlayerNumber").val() == '') {
2745 2793 var layerInputVal = 0;
2746 2794  
2747   - var layerInputValInc = parseInt(layerInputVal);
2748   - $scope.layerNumber = parseInt(layerInputValInc);
2749   - $("#txtlayerNumber").val($scope.layerNumber);
2750   - // $rootScope.PreviouslayerNumbr = $scope.layerNumber;
  2795 + var layerInputValInc = parseInt(layerInputVal);
  2796 + $scope.layerNumber = parseInt(layerInputValInc);
  2797 + $("#txtlayerNumber").val($scope.layerNumber);
  2798 + // $rootScope.PreviouslayerNumbr = $scope.layerNumber;
2751 2799  
2752 2800 }
2753 2801 else {
... ... @@ -2770,7 +2818,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2770 2818 var layerInputValDec = parseInt(layerInputVal);
2771 2819 $scope.layerNumber = parseInt(layerInputValDec);
2772 2820 $("#txtlayerNumber").val($scope.layerNumber);
2773   - // $rootScope.PreviouslayerNumbr = $scope.layerNumber;
  2821 + // $rootScope.PreviouslayerNumbr = $scope.layerNumber;
2774 2822  
2775 2823 }
2776 2824 else
... ... @@ -3057,10 +3105,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3057 3105  
3058 3106 //$("#bord").css("display", "none");
3059 3107 //$("#dot").css("display", "none");
3060   - $('#sppeachBubble').remove();
  3108 + $('#sppeachBubble').remove();
3061 3109  
3062   - $("#bord").remove();
3063   - $("#dot").remove();
  3110 + $("#bord").remove();
  3111 + $("#dot").remove();
3064 3112  
3065 3113 });
3066 3114  
... ... @@ -3487,7 +3535,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3487 3535 drag: function (evt) {
3488 3536  
3489 3537 //$("#dot_annotation").css("display", "none");
3490   - $("#dot_annotation").remove();
  3538 + $("#dot_annotation").remove();
3491 3539  
3492 3540 var verticalScrollPosition = canvasDiv.scrollTop;
3493 3541 var horizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -3821,7 +3869,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3821 3869 if (document.getElementById('tempCanvas') != null) {
3822 3870 $('#tempCanvas').remove();
3823 3871 }
3824   - if (document.getElementById('tempCanvas') == null) {
  3872 + if (document.getElementById('tempCanvas') == null || document.getElementById('tempCanvas') == undefined) {
3825 3873 var tempCanvas = document.createElement('canvas');
3826 3874 tempCanvas.id = 'tempCanvas';
3827 3875 // $scope.tempCanvas = transparencyCanvas.id;
... ... @@ -3836,6 +3884,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3836 3884 document.getElementById('canvasDiv').appendChild(tempCanvas);
3837 3885 }
3838 3886  
  3887 +
3839 3888 $scope.isTransparencyActivated = true;
3840 3889  
3841 3890 var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
... ... @@ -3867,6 +3916,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3867 3916 transparencyCanvas.style.top = $scope.startY + "px"//y + "px";
3868 3917 transparencyCanvas.style.border = "black 1px solid";
3869 3918 transparencyCanvas.style.backgroundColor = "transparent";
  3919 + transparencyCanvas.style.zIndex = 200;
3870 3920 // transparencyCanvas.style.visibility = 'hidden';
3871 3921 document.getElementById('canvasDiv').appendChild(transparencyCanvas);
3872 3922 $scope.transparencyChangeCounter = 0;
... ... @@ -3881,27 +3931,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3881 3931  
3882 3932 $(".ui-wrapper").css("z-index", "600");
3883 3933  
3884   - // $('#transparencyScale').modal('show');
3885   -
3886   - //canvasDiv.removeEventListener('mouseup', arguments.callee);
3887   - //canvasDiv.removeEventListener('mousedown', arguments.callee);
3888   - //canvasDiv.removeEventListener('mousemove', arguments.callee);
3889 3934 }
3890 3935 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
3891 3936  
3892   - //if ($rootScope.voId != "9") {
3893   - // if ($rootScope.voId != "11") {
3894   - // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
3895   -
3896   - // }
3897   -
3898   - //}
3899 3937  
3900   - //else {
3901   - // if (value.bodyRegionId == "6") {
3902   - // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
3903   - // }
3904   - //}
3905 3938 if (($rootScope.voId == "9" || $rootScope.voId == "11")) {
3906 3939 if (value.bodyRegionId == "6") {
3907 3940 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
... ... @@ -3917,6 +3950,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3917 3950 }
3918 3951 })
3919 3952  
  3953 + //for modesty
  3954 + if ($rootScope.isModestyOn == true && $scope.modestyImageInfo.length > 0) {
  3955 + $.each($scope.modestyImageInfo, function (index, value) {
  3956 + // alert(' $.each(BodyRegionDictionary1')
  3957 + var transparencyBoxHeight = parseInt(TransparencyBoxEndY) - parseInt($scope.TransparencyBoxStartY);
  3958 + var transparencyBoxWidth = parseInt(TransparencyEndX) - parseInt($scope.TransparencyBoxStartX);
  3959 + var transparencyBoxBottom = parseInt($scope.TransparencyBoxStartY) + parseInt(transparencyBoxHeight);
  3960 + var transparencyBoxRight = parseInt($scope.TransparencyBoxStartX) + parseInt(transparencyBoxWidth);
  3961 + // alert(' $.each(BodyRegionDictionary2. transparencyBoxHeight: ' + transparencyBoxHeight + ',transparencyBoxBottom: ' + transparencyBoxBottom+', transparencyBoxRight: '+transparencyBoxRight)
  3962 + var bodyRegionRight = parseInt(value.x) + parseInt(value.Width);
  3963 + var bodyRegionBottom = parseInt(value.y) + parseInt(value.Height);
  3964 +
  3965 + if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.x <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.y <= transparencyBoxBottom) {
  3966 +
  3967 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
  3968 +
  3969 + }
  3970 + })
  3971 + }
  3972 +
  3973 +
  3974 + //
  3975 +
3920 3976 // $('#transparencyScale').modal('show');
3921 3977 $('#transparencyScale').css('position', 'fixed')
3922 3978 $('#transparencyScale').css('top', $scope.TBDrawStartY - 10)
... ... @@ -3926,8 +3982,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3926 3982  
3927 3983  
3928 3984  
3929   - document.getElementById('canvasDiv').removeEventListener("mousedown", mouseUpListener);
3930   - document.getElementById('canvasDiv').removeEventListener("mousemove", mouseUpListener);
  3985 + document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
  3986 + document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
3931 3987  
3932 3988 document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener);
3933 3989 // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
... ... @@ -3945,6 +4001,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3945 4001  
3946 4002 $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged) {
3947 4003 // debugger;
  4004 +
  4005 + // else {
  4006 +
3948 4007 var scope1 = angular.element(document.getElementById("DAView")).scope();
3949 4008 var transparencyCanvas = document.getElementById('transparencyCanvas');
3950 4009  
... ... @@ -3970,12 +4029,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3970 4029 var transparencyTempCanvas;
3971 4030  
3972 4031  
  4032 +
3973 4033 //X ends outside and start outside of bodyregion
3974 4034 if (TransparencyBoxStartX < X && TransparencyEndX > parseInt(X) + parseInt(Width)) {
3975 4035 XforCopyImage = 0;
3976 4036 WidthforCopyImage = Width;
3977 4037 WidthforTransImage = Width;
3978   - XforTransImage = parseInt(X) - (parseInt(TransparencyBoxStartX));
  4038 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4039 + XforTransImage = 0;
  4040 + }
  4041 + else
  4042 + XforTransImage = parseInt(X) - (parseInt(TransparencyBoxStartX));
3979 4043 // alert('1')
3980 4044 }
3981 4045 else if (TransparencyBoxStartX < X && TransparencyEndX < parseInt(X) + parseInt(Width)) {
... ... @@ -3987,7 +4051,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3987 4051 WidthforTransImage = parseInt(TransparencyEndX) - parseInt(X);
3988 4052  
3989 4053 // alert(' scope.WidthforCopyImage: ' + scope.WidthforCopyImage)
3990   - XforTransImage = parseInt(X) - (parseInt(TransparencyBoxStartX));
  4054 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4055 + XforTransImage = 0;
  4056 + }
  4057 + else
  4058 + XforTransImage = parseInt(X) - (parseInt(TransparencyBoxStartX));
3991 4059  
3992 4060 // alert('2')
3993 4061 }
... ... @@ -3997,7 +4065,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3997 4065 XforCopyImage = parseInt(TransparencyBoxStartX) - parseInt(X);
3998 4066 WidthforCopyImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX);
3999 4067 WidthforTransImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX);
4000   - XforTransImage = 0;
  4068 +
  4069 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4070 +
  4071 + XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X);
  4072 + }
  4073 + else
  4074 + XforTransImage = 0;
4001 4075 // alert('3')
4002 4076 }
4003 4077 else if (TransparencyBoxStartX > X && TransparencyEndX < parseInt(X) + parseInt(Width)) {
... ... @@ -4005,7 +4079,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4005 4079 XforCopyImage = parseInt(TransparencyBoxStartX) - parseInt(X);//parseInt(X) + parseInt(Width) - parseInt(scope.TransparencyBoxStartX)// scope.TransparencyBoxStartX ;
4006 4080 WidthforCopyImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX);
4007 4081 WidthforTransImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX);
4008   - XforTransImage = 0
  4082 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4083 +
  4084 + XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X);
  4085 + }
  4086 + else
  4087 + XforTransImage = 0;
4009 4088 // alert('4. TransparencyBoxStartX: ' + TransparencyBoxStartX + ',X: ' + parseInt(X) + ',TransparencyEndX: ' + TransparencyEndX + ',XforCopyImage: ' + XforCopyImage)
4010 4089 }
4011 4090  
... ... @@ -4021,7 +4100,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4021 4100  
4022 4101 HeightforTransImage = Height;
4023 4102 //alert('Y ' + Y)
4024   - YforTransImage = parseFloat(Y) - parseInt(TransparencyBoxStartY)//parseFloat(Y) - (24.4);
  4103 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4104 + YforTransImage = 0;
  4105 + }
  4106 + else
  4107 + YforTransImage = parseFloat(Y) - parseInt(TransparencyBoxStartY)//parseFloat(Y) - (24.4);
4025 4108 // alert('5')
4026 4109 }
4027 4110 else if (TransparencyBoxStartY < Y && TransparencyBoxEndY < (parseInt(Y) + parseInt(Height))) {
... ... @@ -4031,7 +4114,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4031 4114  
4032 4115 HeightforTransImage = (parseInt(TransparencyBoxEndY)) - parseInt(Y)// - parseInt(scope.TransparencyBoxStartY));
4033 4116  
4034   - YforTransImage = parseFloat(Y) - parseInt(TransparencyBoxStartY);// - (24.4);
  4117 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4118 + YforTransImage = 0;
  4119 + }
  4120 + else
  4121 + YforTransImage = parseFloat(Y) - parseInt(TransparencyBoxStartY);// - (24.4);
4035 4122  
4036 4123 }
4037 4124 else if (TransparencyBoxStartY > Y && TransparencyBoxEndY > parseInt(Y) + parseInt(Height)) {
... ... @@ -4039,7 +4126,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4039 4126 YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
4040 4127 HeightforCopyImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY);
4041 4128 HeightforTransImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY);
4042   - YforTransImage = 0;
  4129 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4130 + YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
  4131 +
  4132 + }
  4133 + else
  4134 + YforTransImage = 0;
4043 4135  
4044 4136 }
4045 4137 else if (TransparencyBoxStartY > Y && TransparencyBoxEndY < parseInt(Y) + parseInt(Height)) {
... ... @@ -4047,149 +4139,142 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4047 4139 YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
4048 4140 HeightforCopyImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY);
4049 4141 HeightforTransImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY);
4050   - YforTransImage = 0;
4051   - }
4052   -
4053   -
4054   - //this changes the transparency when user click on transparency scale(we have already set the original
4055   - //data on tras canvas irrespective of the trans number, so we can chnage the transparnecy of original data not the manipulated)
4056   - if (isTransparencyChanged == true) {
4057   -
4058   - // var txtTransparencyChange = document.getElementById("txtTransparencyChange");
4059   -
4060   - var transNumber = $scope.transNumber;
  4142 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4143 + YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
4061 4144  
4062   - var ctx = document.getElementById('transparencyCanvas').getContext('2d');
4063   -
4064   - var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
4065   -
4066   - // get the image data values
4067   - var imageData = imageDa.data;
4068   - var length = imageData.length;
4069   - // set every fourth value to 50
4070   - for (var i = 3; i < length; i += 4) {
4071   - //NIKITA
4072   - if ($scope.voId == "9" || $scope.voId == "11") {
4073   -
4074   - if (imageData[i] == 0) {
4075   -
4076   - }
4077   - else {
4078   - imageData[i] = ((255) * (parseInt(transNumber))) / 100;
4079   - }
4080   - }
4081   - else {
4082   - imageData[i] = ((255) * (parseInt(transNumber))) / 100;
4083   - }
4084   -
4085   - // imageData[i] = ((255) * (parseInt(transNumber))) / 100;
4086 4145 }
4087   - // after the manipulation, reset the data
4088   - // imageDa.data = imageData;
4089   - // and put the imagedata back to the canvas
4090   - ctx.putImageData(imageDa, XforTransImage, YforTransImage);
  4146 + else
  4147 + YforTransImage = 0;
  4148 + }
4091 4149  
4092 4150  
  4151 + //0. get current layer number
  4152 + if ($scope.isResized) {
  4153 + //do nothing
4093 4154 }
4094   - else {
  4155 + else if (isLayerChanged) {
4095 4156  
4096   - //0. get current layer number
4097   - if ($scope.isResized) {
4098   - //do nothing
4099   - }
4100   - else if (isLayerChanged) {
4101 4157  
4102   - // alert('isMousUp on isLayerChanged');
  4158 + }
  4159 + else {
4103 4160  
4104   - //$scope.layerNumber = parseInt($('#txtlayerNumber').val());
4105 4161  
4106   - }
4107   - else {
4108   - //var currentLayer = parseInt($('#txtlayerNumber').val());
  4162 + var tranparencyLayer;
4109 4163  
4110   - //var tranparencyLayer = currentLayer + 1;
4111   - //$scope.layerNumber = tranparencyLayer;
  4164 + var currentLayer = $scope.layerNumberBeforeTrans;
4112 4165  
4113   - var tranparencyLayer;
  4166 + if (currentLayer == $rootScope.totalLayers) {
4114 4167  
4115   - //var currentLayer = parseInt($('#txtlayerNumber').val());
4116   - var currentLayer = $scope.layerNumberBeforeTrans;
  4168 + tranparencyLayer = currentLayer;
4117 4169  
4118   - if (currentLayer == $rootScope.totalLayers) {
  4170 + }
4119 4171  
4120   - tranparencyLayer = currentLayer;
  4172 + else {
4121 4173  
4122   - }
  4174 + tranparencyLayer = currentLayer + 1;
4123 4175  
4124   - else {
  4176 + }
4125 4177  
4126   - tranparencyLayer = currentLayer + 1;
  4178 + $scope.layerNumber = tranparencyLayer;
4127 4179  
4128   - }
  4180 + }
4129 4181  
4130   - $scope.layerNumber = tranparencyLayer;
  4182 + $('#txtlayerNumber').val($scope.layerNumber);
4131 4183  
4132   - }
  4184 + //dedebugger;
  4185 + var tranparencyImgSrc;
  4186 + var tranparencyMaskImgSrc;
  4187 + //for modesty image
  4188 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg')))// == "2" || bodyRegionId == "3")) {
  4189 + {
  4190 + var modestyBodyRegionData = new jinqJs()
  4191 + .from($scope.modestyImageInfo)
  4192 + .where('bodyRegionId == ' + bodyRegionId)
  4193 + .select();
  4194 + tranparencyImgSrc = modestyBodyRegionData[0].SRC;
  4195 + }
4133 4196  
4134   - $('#txtlayerNumber').val($scope.layerNumber);
  4197 + //modesty end
4135 4198  
4136   - //dedebugger;
4137 4199 //1. get the image source
4138   - var tranparencyImgSrc;
4139 4200  
  4201 + else {
4140 4202 tranparencyImgSrc = $scope.GetImageSource(bodyRegionId);
4141   - var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
4142   - // debugger;
4143   - var oldCanvas;
  4203 + tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
  4204 + }
  4205 + // var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
  4206 + // debugger;
  4207 + var oldCanvas;
4144 4208  
4145   - if (IsMirror == 'Yes') {
4146   - oldCanvas = document.getElementById('transparencyTempCanvas_MR_' + bodyRegionId)
4147   - }
4148   - else {
4149   - oldCanvas = document.getElementById('transparencyTempCanvas_' + bodyRegionId)
  4209 + if (IsMirror == 'Yes') {
  4210 + oldCanvas = document.getElementById('transparencyTempCanvas_MR_' + bodyRegionId)
  4211 + }
  4212 + else {
  4213 +
  4214 + oldCanvas = document.getElementById('transparencyTempCanvas_' + bodyRegionId)
  4215 +
  4216 + }
4150 4217  
4151   - }
  4218 + if (oldCanvas != null) {
  4219 + document.getElementById('canvasDiv').removeChild(oldCanvas);
  4220 + }
4152 4221  
4153   - if (oldCanvas != null) {
4154   - document.getElementById('canvasDiv').removeChild(oldCanvas);
4155   - }
  4222 + //remove tempmask canvas
  4223 + var oldtempTransCanvasMask;
  4224 + var oldtempTransCanvasMaskMR;
  4225 + if (IsMirror == 'Yes') {
  4226 + oldtempTransCanvasMaskMR = document.getElementById('transparencyTempCanvasMask_MR' + bodyRegionId + '_mci');
  4227 + oldtempTransCanvasMask = document.getElementById('transparencyTempCanvasMask_' + bodyRegionId + '_mci');
4156 4228  
4157   - //remove tempmask canvas
4158   - var oldtempTransCanvasMask;
4159   - if (IsMirror == 'Yes') {
4160   - oldtempTransCanvasMask = document.getElementById('transparencyTempCanvasMask_MR_' + bodyRegionId + '_mci');
  4229 + if (oldtempTransCanvasMaskMR != null) {
  4230 + document.getElementById('canvasDiv').removeChild(oldtempTransCanvasMaskMR);
4161 4231 }
4162   - else {
4163   - oldtempTransCanvasMask = document.getElementById('transparencyTempCanvasMask_' + bodyRegionId + '_mci');
  4232 + }
  4233 + else {
  4234 + oldtempTransCanvasMask = document.getElementById('transparencyTempCanvasMask_' + bodyRegionId + '_mci');
4164 4235  
4165   - }
4166   - if (oldtempTransCanvasMask != null) {
4167   - document.getElementById('canvasDiv').removeChild(oldtempTransCanvasMask);
4168   - }
  4236 + }
  4237 + if (oldtempTransCanvasMask != null) {
  4238 + document.getElementById('canvasDiv').removeChild(oldtempTransCanvasMask);
  4239 + }
4169 4240  
4170   - transparencyTempCanvas = document.createElement('canvas');
4171   - var transparencyTempcanavsMask = document.createElement('canvas');
4172   - //if mirror then draw mask image for non mirrored body region for annotation
4173   - if (IsMirror == 'Yes') {
4174   - transparencyTempCanvas.id = 'transparencyTempCanvas_MR_' + bodyRegionId;
4175   - transparencyTempcanavsMask.id = 'transparencyTempCanvasMask_MR' + bodyRegionId + '_mci';
  4241 + transparencyTempCanvas = document.createElement('canvas');
  4242 + var transparencyTempcanavsMask = document.createElement('canvas');
  4243 + //if mirror then draw mask image for non mirrored body region for annotation
  4244 + if (IsMirror == 'Yes') {
  4245 + transparencyTempCanvas.id = 'transparencyTempCanvas_MR_' + bodyRegionId;
  4246 + transparencyTempcanavsMask.id = 'transparencyTempCanvasMask_MR' + bodyRegionId + '_mci';
  4247 + }
  4248 + else {
  4249 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4250 + transparencyTempCanvas.id = 'transparencyTempCanvas_' + bodyRegionId;
  4251 + // transparencyTempCanvas.style.visibility = 'visible';
  4252 + //transparencyTempCanvas.style.zIndex = '1000'
4176 4253 }
4177 4254 else {
4178 4255 transparencyTempCanvas.id = 'transparencyTempCanvas_' + bodyRegionId;
4179 4256 transparencyTempcanavsMask.id = 'transparencyTempCanvasMask_' + bodyRegionId + '_mci';
4180   -
4181 4257 }
4182   - transparencyTempCanvas.height = Height;
4183   - transparencyTempCanvas.width = Width;
4184   - transparencyTempCanvas.style.position = "absolute";
4185   - transparencyTempCanvas.style.left = X + 'px' // x + "px";
4186   - transparencyTempCanvas.style.top = Y + "px"//y + "px";
4187   - transparencyTempCanvas.style.visibility = 'hidden';
4188   - //transparencyTempCanvas.style.visibility = 'visible';
4189   - // transparencyCanvas.style.zIndex = 4000;
4190   - document.getElementById('canvasDiv').appendChild(transparencyTempCanvas);
4191 4258  
4192   - //create temp mask canvas
  4259 + }
  4260 + transparencyTempCanvas.height = Height;
  4261 + transparencyTempCanvas.width = Width;
  4262 + transparencyTempCanvas.style.position = "absolute";
  4263 + transparencyTempCanvas.style.left = X + 'px' // x + "px";
  4264 + transparencyTempCanvas.style.top = Y + "px"//y + "px";
  4265 + //if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4266 + // transparencyTempCanvas.style.visibility = 'visible';
  4267 + //}
  4268 + //else {
  4269 + transparencyTempCanvas.style.visibility = 'hidden';
  4270 + // }
  4271 + //transparencyTempCanvas.style.visibility = 'visible';
  4272 + // transparencyCanvas.style.zIndex = 4000;
  4273 + document.getElementById('canvasDiv').appendChild(transparencyTempCanvas);
  4274 +
  4275 + //create temp mask canvas
  4276 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { }
  4277 + else {
4193 4278 transparencyTempcanavsMask.height = Height;
4194 4279 transparencyTempcanavsMask.width = Width;
4195 4280 transparencyTempcanavsMask.style.position = "absolute";
... ... @@ -4199,14 +4284,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4199 4284 //transparencyTempCanvas.style.visibility = 'visible';
4200 4285 // transparencyCanvas.style.border = "black 1px solid";
4201 4286 document.getElementById('canvasDiv').appendChild(transparencyTempcanavsMask);
  4287 + }
  4288 +
  4289 + //for modesty canvas
  4290 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4291 +
  4292 + var modestyTransTempCanvasId = 'tempCanvasModesty_' + bodyRegionId;
  4293 + var modestyTransCanvasId = 'modestyTransCanavs_' + bodyRegionId;
  4294 + if (document.getElementById(modestyTransTempCanvasId) != null) {
  4295 + document.getElementById(modestyTransTempCanvasId).parentNode.removeChild(document.getElementById(modestyTransTempCanvasId));
  4296 + }
  4297 +
  4298 + if (document.getElementById(modestyTransTempCanvasId) == null || document.getElementById(modestyTransTempCanvasId) == undefined) {
  4299 + var tempCanvasModesty = document.createElement('canvas');
  4300 + tempCanvasModesty.id = modestyTransTempCanvasId;
  4301 + // $scope.tempCanvas = transparencyCanvas.id;
  4302 + tempCanvasModesty.height = Height;
  4303 + tempCanvasModesty.width = Width;
  4304 + tempCanvasModesty.style.position = "absolute";
  4305 + tempCanvasModesty.style.left = 10 + 'px';
  4306 + tempCanvasModesty.style.top = 10 + 'px';
  4307 + tempCanvasModesty.style.backgroundColor = "transparent";
  4308 + tempCanvasModesty.style.visibility = 'hidden';
  4309 + tempCanvasModesty.style.border = "black 1px solid";
  4310 + document.getElementById('canvasDiv').appendChild(tempCanvasModesty);
  4311 + }
  4312 + if (document.getElementById(modestyTransCanvasId) != null) {
  4313 + document.getElementById(modestyTransCanvasId).parentNode.removeChild(document.getElementById(modestyTransCanvasId));
  4314 + }
4202 4315  
  4316 + if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) {
  4317 + var canvasModesty = document.createElement('canvas');
  4318 + canvasModesty.id = modestyTransCanvasId;
  4319 + // $scope.tempCanvas = transparencyCanvas.id;
  4320 + canvasModesty.height = Height;
  4321 + canvasModesty.width = Width;
  4322 + canvasModesty.style.position = "absolute";
  4323 + canvasModesty.style.left = X + 'px';
  4324 + canvasModesty.style.top = Y + 'px';
  4325 + //canvasModesty.style.backgroundColor = "transparent";
  4326 + canvasModesty.style.visibility = 'visible';
  4327 + canvasModesty.style.zIndex = '2000';
  4328 + canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
4203 4329  
  4330 + // tempcanvasModestyCanvasModesty.style.border = "black 1px solid";
  4331 + document.getElementById('canvasDiv').appendChild(canvasModesty);
  4332 + }
  4333 + }
  4334 +
  4335 + if (tranparencyImgSrc != undefined) {
4204 4336 var tempImg = new Image();
4205   - tempImg.src = tranparencyImgSrc;//"http://localhost/AIA/" + tranparencyImgSrc;
4206 4337  
4207 4338  
4208 4339 tempImg.onload = function () {
4209   - // debugger;
4210 4340 var tempCtx = transparencyTempCanvas.getContext('2d');
4211 4341  
4212 4342 if (IsMirror == 'Yes') {
... ... @@ -4227,7 +4357,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4227 4357 tempCanvasID = 'transparencyTempCanvas_MR_' + bodyRegionId;
4228 4358 }
4229 4359 else {
4230   - tempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;
  4360 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4361 + tempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;//bodyRegionId;
  4362 + }
  4363 + else
  4364 + tempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;
4231 4365 }
4232 4366  
4233 4367  
... ... @@ -4245,11 +4379,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4245 4379  
4246 4380 //keep the original image on temp canavs to use it in changing transparency
4247 4381  
4248   - if (document.getElementById('tempCanvas') != null) {
4249   - var contx = document.getElementById('tempCanvas').getContext('2d');
4250   - var tbTempCanvas = document.getElementById(tempCanvasID)
4251   - contx.drawImage(tbTempCanvas, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
4252 4382  
  4383 +
  4384 + //if (document.getElementById(modestyTransTempCanvasId) != undefined || document.getElementById(modestyTransTempCanvasId) != null) {
  4385 + // var contxModesty = document.getElementById(modestyTransTempCanvasId).getContext('2d');
  4386 + // var tbTempCanvas = document.getElementById(tempCanvasID)
  4387 + // contx.drawImage(tbTempCanvas, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
  4388 +
  4389 + //}
  4390 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4391 + var modestyTempCanvasId = 'tempCanvasModesty_' + bodyRegionId;
  4392 + if (document.getElementById(modestyTempCanvasId) != undefined || document.getElementById(modestyTempCanvasId) != null) {
  4393 + var contxModesty = document.getElementById(modestyTempCanvasId).getContext('2d');
  4394 + var tbTempCanvas = document.getElementById(tempCanvasID)
  4395 + contxModesty.drawImage(tbTempCanvas, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
  4396 +
  4397 + }
  4398 + }
  4399 + else {
  4400 +
  4401 + if (document.getElementById('tempCanvas') != null && document.getElementById('tempCanvas') != undefined) {
  4402 + var contx = document.getElementById('tempCanvas').getContext('2d');
  4403 + var tbTempCanvas = document.getElementById(tempCanvasID)
  4404 + contx.drawImage(tbTempCanvas, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
  4405 +
  4406 + }
4253 4407 }
4254 4408  
4255 4409 // get the image data values
... ... @@ -4272,15 +4426,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4272 4426 }
4273 4427 }
4274 4428 else {
4275   - imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4429 + if (imageData[i] == 0) {
  4430 +
  4431 + }
  4432 + else {
  4433 + imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4434 + }
4276 4435 }
4277 4436 }
4278 4437  
4279 4438  
4280 4439 tempCtx.putImageData(imageD, 0, 0);
4281 4440  
4282   -
4283   - var ctx = transparencyCanvas.getContext('2d');
  4441 + var ctx;
  4442 + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4443 + ctx = document.getElementById(modestyTransCanvasId).getContext('2d');
  4444 + }
  4445 + else
  4446 + ctx = transparencyCanvas.getContext('2d');
4284 4447  
4285 4448  
4286 4449 var TrtempCanvasID
... ... @@ -4288,6 +4451,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4288 4451 TrtempCanvasID = 'transparencyTempCanvas_MR_' + bodyRegionId;
4289 4452 }
4290 4453 else {
  4454 + //if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {
  4455 + // TrtempCanvasID = 'modestyTransparencyTempCanvas_' + bodyRegionId;
  4456 + //}
  4457 + //else
4291 4458 TrtempCanvasID = 'transparencyTempCanvas_' + bodyRegionId;
4292 4459 }
4293 4460  
... ... @@ -4307,76 +4474,183 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4307 4474 PreviousBodyRegionHeight = 0;
4308 4475  
4309 4476 }
  4477 + tempImg.src = tranparencyImgSrc;//"http://localhost/AIA/" + tranparencyImgSrc;
4310 4478  
  4479 + }
4311 4480  
4312   - //mask image code
4313   - //draw mask for annotation
4314   - var tempMaskImg = new Image();
4315   - var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
4316   - tempMaskImg.src = tranparencyMaskImgSrc;//"http://localhost/AIA/" + tranparencyMaskImgSrc;
4317   - tempMaskImg.onload = function () {
4318   - // debugger;
4319   - var tempmaskCtx = transparencyTempcanavsMask.getContext('2d');
4320   -
4321   - if (IsMirror == 'Yes') {
4322   - //debugger;
4323   - tempmaskCtx.save();
4324   - tempmaskCtx.translate(Width, 0);
4325   - tempmaskCtx.scale(-1, 1);
4326   - tempmaskCtx.drawImage(tempMaskImg, 0, 0);
4327   - }
4328   - else {
4329   - tempmaskCtx.drawImage(tempMaskImg, 0, 0);
4330   -
4331   - }
4332 4481  
  4482 + //mask image code
  4483 + //draw mask for annotation
  4484 + var tempMaskImg = new Image();
  4485 + var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
  4486 + tempMaskImg.src = tranparencyMaskImgSrc;//"http://localhost/AIA/" + tranparencyMaskImgSrc;
  4487 + tempMaskImg.onload = function () {
  4488 + // debugger;
  4489 + var tempmaskCtx = transparencyTempcanavsMask.getContext('2d');
4333 4490  
  4491 + if (IsMirror == 'Yes') {
  4492 + //debugger;
  4493 + tempmaskCtx.save();
  4494 + tempmaskCtx.translate(Width, 0);
  4495 + tempmaskCtx.scale(-1, 1);
  4496 + tempmaskCtx.drawImage(tempMaskImg, 0, 0);
4334 4497 }
  4498 + else {
  4499 + tempmaskCtx.drawImage(tempMaskImg, 0, 0);
4335 4500  
  4501 + }
4336 4502  
4337   - PreviousBodyRegionHeight = HeightforTransImage;
4338   - PreviousBodyRegionY = YforTransImage;
4339   - PreviousBodyRegionWidth = WidthforTransImage;
4340   - PreviousBodyRegionX = XforTransImage;
4341   - previousBodyRegionId = bodyRegionId;
4342   -
4343   - // $scope.layerNumber = parseInt($scope.layerNumber - 1);
4344 4503  
4345 4504 }
4346 4505  
4347   - }
4348 4506  
  4507 + PreviousBodyRegionHeight = HeightforTransImage;
  4508 + PreviousBodyRegionY = YforTransImage;
  4509 + PreviousBodyRegionWidth = WidthforTransImage;
  4510 + PreviousBodyRegionX = XforTransImage;
  4511 + previousBodyRegionId = bodyRegionId;
4349 4512  
  4513 + // $scope.layerNumber = parseInt($scope.layerNumber - 1);
4350 4514  
  4515 + //}
4351 4516  
  4517 + }
4352 4518  
  4519 + $scope.changeTransparency = function () {
  4520 + //this changes the transparency when user click on transparency scale(we have already set the original
  4521 + //data on tras canvas irrespective of the trans number, so we can chnage the transparnecy of original data not the manipulated)
  4522 + // if (isTransparencyChanged == true) {
4353 4523  
4354   - function resizeCanvas() {
4355   - //debugger;
4356   - // alert('reload')
4357   - clearTransCanvas();
4358   - if ($('#speechBubbleTrns').length > 0) {
4359   - $('#speechBubbleTrns').remove();
4360   - }
4361   - var tCanvas = document.getElementById('transparencyCanvas');
4362   - var tCanvasContext = tCanvas.getContext('2d');
  4524 + // var txtTransparencyChange = document.getElementById("txtTransparencyChange");
4363 4525  
4364   - var tCanvasHeight = parseInt((tCanvas.style.height).replace('px', ''));
  4526 + var transNumber = $scope.transNumber;
4365 4527  
4366   - var tCanvasWidth = parseInt((tCanvas.style.width).replace('px', ''));
  4528 + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
  4529 + var modestyTemCanvas = $("canvas[id*='tempCanvasModesty_']");
  4530 + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  4531 +
  4532 + for (var j = 0; j < modestyTransCanvases.length; j++) {
  4533 + var ctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d');
  4534 + var imageDa = ctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height);
  4535 + //modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]);
4367 4536  
4368   - var tBoxStartX = parseInt((tCanvas.style.left).replace('px', ''));
4369   - var tBoxEndX = parseInt((tCanvas.style.left).replace('px', '')) + parseInt((tCanvas.style.width.replace('px', '')));
4370   - var tBoxStartY = parseInt((tCanvas.style.top).replace('px', ''));
4371   - var tBoxEndY = parseInt((tCanvas.style.top).replace('px', '')) + parseInt((tCanvas.style.height).replace('px', ''));
4372   - var transparencyBoxBottom = parseInt(tBoxStartY) + parseInt(tCanvasHeight);
4373   - var transparencyBoxRight = parseInt(tBoxStartX) + parseInt(tCanvasWidth);
  4537 + var imageData = imageDa.data;
  4538 + var length = imageData.length;
  4539 + // set every fourth value to 50
  4540 + for (var i = 3; i < length; i += 4) {
  4541 + //NIKITA
  4542 + if ($scope.voId == "9" || $scope.voId == "11") {
4374 4543  
4375   - if (tCanvas != null) {
4376   - $('#transparencyCanvas').remove();
  4544 + if (imageData[i] == 0) {
  4545 +
  4546 + }
  4547 + else {
  4548 + imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4549 + }
  4550 + }
  4551 + else {
  4552 + if (imageData[i] == 0) {
  4553 +
  4554 + }
  4555 + else
  4556 + imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4557 + }
  4558 +
  4559 + // imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4560 + }
  4561 + // after the manipulation, reset the data
  4562 + // imageDa.data = imageData;
  4563 + // and put the imagedata back to the canvas
  4564 + //ctx.putImageData(imageDa, XforTransImage, YforTransImage);
  4565 + ctx.putImageData(imageDa, 0, 0);
  4566 + }
  4567 + }
  4568 +
  4569 +
  4570 + var ctx = document.getElementById('transparencyCanvas').getContext('2d');
  4571 +
  4572 + // var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage);
  4573 + var imageDa = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight);
  4574 +
  4575 + // get the image data values
  4576 + var imageData = imageDa.data;
  4577 + var length = imageData.length;
  4578 + // set every fourth value to 50
  4579 + for (var i = 3; i < length; i += 4) {
  4580 + //NIKITA
  4581 + if ($scope.voId == "9" || $scope.voId == "11") {
  4582 +
  4583 + if (imageData[i] == 0) {
  4584 +
  4585 + }
  4586 + else {
  4587 + imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4588 + }
  4589 + }
  4590 + else {
  4591 + if (imageData[i] == 0) {
  4592 +
  4593 + }
  4594 + else
  4595 + imageData[i] = ((255) * (parseInt(transNumber))) / 100;
  4596 + }
  4597 +
  4598 + // imageData[i] = ((255) * (parseInt(transNumber))) / 100;
4377 4599 }
  4600 + // after the manipulation, reset the data
  4601 + // imageDa.data = imageData;
  4602 + // and put the imagedata back to the canvas
  4603 + //ctx.putImageData(imageDa, XforTransImage, YforTransImage);
  4604 + ctx.putImageData(imageDa, 0, 0);
4378 4605  
4379 4606  
  4607 + //}
  4608 + }
  4609 +
  4610 +
  4611 +
  4612 + function resizeCanvas() {
  4613 + //debugger;
  4614 + // alert('reload')
  4615 + clearTransCanvas();
  4616 + if ($('#speechBubbleTrns').length > 0) {
  4617 + $('#speechBubbleTrns').remove();
  4618 + }
  4619 + var tCanvas = document.getElementById('transparencyCanvas');
  4620 + var tCanvasContext = tCanvas.getContext('2d');
  4621 +
  4622 + var tCanvasHeight = parseInt((tCanvas.style.height).replace('px', ''));
  4623 +
  4624 + var tCanvasWidth = parseInt((tCanvas.style.width).replace('px', ''));
  4625 +
  4626 + var tBoxStartX = parseInt((tCanvas.style.left).replace('px', ''));
  4627 + var tBoxEndX = parseInt((tCanvas.style.left).replace('px', '')) + parseInt((tCanvas.style.width.replace('px', '')));
  4628 + var tBoxStartY = parseInt((tCanvas.style.top).replace('px', ''));
  4629 + var tBoxEndY = parseInt((tCanvas.style.top).replace('px', '')) + parseInt((tCanvas.style.height).replace('px', ''));
  4630 + var transparencyBoxBottom = parseInt(tBoxStartY) + parseInt(tCanvasHeight);
  4631 + var transparencyBoxRight = parseInt(tBoxStartX) + parseInt(tCanvasWidth);
  4632 +
  4633 + if (tCanvas != null) {
  4634 + $('#transparencyCanvas').remove();
  4635 + }
  4636 +
  4637 +
  4638 + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
  4639 + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  4640 + for (var j = 0; j < modestyTransCanvases.length; j++) {
  4641 +
  4642 + modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]);
  4643 + }
  4644 + }
  4645 +
  4646 + var modestyTempCanvases = $("canvas[id*='tempCanvasModesty_']");
  4647 + if (modestyTempCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  4648 + for (var j = 0; j < modestyTempCanvases.length; j++) {
  4649 +
  4650 + modestyTempCanvases[j].parentNode.removeChild(modestyTempCanvases[j]);
  4651 + }
  4652 + }
  4653 +
4380 4654 $scope.isResized = true;
4381 4655  
4382 4656  
... ... @@ -4392,10 +4666,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4392 4666 transparencyCanvas.style.left = tCanvas.style.left; // x + "px";
4393 4667 transparencyCanvas.style.top = tCanvas.style.top//y + "px";
4394 4668 transparencyCanvas.style.border = "black 1px solid";
  4669 + transparencyCanvas.style.zIndex = 200;
  4670 +
  4671 +
4395 4672 document.getElementById('canvasDiv').appendChild(transparencyCanvas);
4396 4673  
4397 4674 $('#transparencyCanvas').resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeCanvas(); }, start: function (event, ui) { clearTransCanvas(); } });
  4675 + $(".ui-wrapper").css("z-index", "600");
4398 4676  
  4677 + //bind click listener
  4678 + transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
4399 4679 }
4400 4680 $scope.transparencyCanvasHeight = tCanvasHeight;
4401 4681 $scope.transparencyCanvasWidth = tCanvasWidth;
... ... @@ -4446,17 +4726,39 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4446 4726  
4447 4727  
4448 4728 })
4449   - //bind click listener
4450   - //bind click listener
4451   - transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener);
4452 4729  
4453 4730  
  4731 + //for modesty
  4732 + if ($rootScope.isModestyOn == true && $scope.modestyImageInfo.length > 0) {
  4733 + $.each($scope.modestyImageInfo, function (index, value) {
  4734 + // alert(' $.each(BodyRegionDictionary1')
  4735 +
  4736 +
  4737 + var bodyRegionRight = parseInt(value.x) + parseInt(value.Width);
  4738 + var bodyRegionBottom = parseInt(value.y) + parseInt(value.Height);
  4739 + var TBRight = parseInt((document.getElementById('transparencyCanvas').style.left).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas').style.width).replace('px', ''));
  4740 + var TBBottom = parseInt((document.getElementById('transparencyCanvas').style.top).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas').style.height).replace('px', ''));
  4741 + var TBStartX = parseInt((document.getElementById('transparencyCanvas').style.left).replace('px', ''));
  4742 + var TBStartY = parseInt((document.getElementById('transparencyCanvas').style.top).replace('px', ''));
  4743 +
  4744 +
  4745 +
  4746 +
  4747 + if (TBStartX <= bodyRegionRight && value.x <= TBRight && TBStartY <= bodyRegionBottom && value.y <= TBBottom) {
  4748 +
  4749 +
  4750 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false);
  4751 +
  4752 + }
  4753 + })
  4754 + }
4454 4755  
4455 4756 // });
4456   - $(".ui-wrapper").css("z-index", "600");
  4757 + //$(".ui-wrapper").css("z-index", "600");
4457 4758 $scope.isResized = false;
4458 4759 }
4459 4760  
  4761 +
4460 4762 function TransparencyCanvasClickListener(evt) {
4461 4763 //alert('tb clicked')
4462 4764 // debugger;
... ... @@ -4479,49 +4781,49 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4479 4781 var isMirror;
4480 4782 var width;
4481 4783 var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
4482   - if ($rootScope.viewOrientationId == 5) {
  4784 + if ($rootScope.viewOrientationId == 5) {
4483 4785  
4484   - var clickedBodyRegionData = new jinqJs()
4485   - .from(BodyRegionDictionary)
4486   - .where('bodyRegionId == 6')
4487   - .select();
  4786 + var clickedBodyRegionData = new jinqJs()
  4787 + .from(BodyRegionDictionary)
  4788 + .where('bodyRegionId == 6')
  4789 + .select();
4488 4790  
4489 4791  
4490   - // clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId;
4491   - x = clickedBodyRegionData[0].X;
4492   - y = clickedBodyRegionData[0].Y;
4493   - width = clickedBodyRegionData[0].Width;
4494   - var height = clickedBodyRegionData[0].Height;
4495   - isMirror = clickedBodyRegionData[0].IsMirror;
4496   - var bodyRegionRight = parseInt(x) + parseInt(width);
4497   - var bodyRegionBottom = parseInt(y) + parseInt(height);
4498   - if (actulalX <= bodyRegionRight && x <= actulalX && actualY <= bodyRegionBottom && y <= actualY) {
  4792 + // clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId;
  4793 + x = clickedBodyRegionData[0].X;
  4794 + y = clickedBodyRegionData[0].Y;
  4795 + width = clickedBodyRegionData[0].Width;
  4796 + var height = clickedBodyRegionData[0].Height;
  4797 + isMirror = clickedBodyRegionData[0].IsMirror;
  4798 + var bodyRegionRight = parseInt(x) + parseInt(width);
  4799 + var bodyRegionBottom = parseInt(y) + parseInt(height);
  4800 + if (actulalX <= bodyRegionRight && x <= actulalX && actualY <= bodyRegionBottom && y <= actualY) {
4499 4801  
4500   - clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId;
4501   - x = clickedBodyRegionData[0].X;
4502   - y = clickedBodyRegionData[0].Y;
4503   - width = clickedBodyRegionData[0].Width;
4504   - var height = clickedBodyRegionData[0].Height;
4505   - isMirror = clickedBodyRegionData[0].IsMirror;
4506   - }
  4802 + clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId;
  4803 + x = clickedBodyRegionData[0].X;
  4804 + y = clickedBodyRegionData[0].Y;
  4805 + width = clickedBodyRegionData[0].Width;
  4806 + var height = clickedBodyRegionData[0].Height;
  4807 + isMirror = clickedBodyRegionData[0].IsMirror;
  4808 + }
4507 4809  
4508   - }
4509   - else {
4510   - $.each(BodyRegionDictionary, function (index, value) {
  4810 + }
  4811 + else {
  4812 + $.each(BodyRegionDictionary, function (index, value) {
4511 4813  
4512   - var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
4513   - var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
4514   - if (actulalX <= bodyRegionRight && value.X <= actulalX && actualY <= bodyRegionBottom && value.Y <= actualY) {
  4814 + var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
  4815 + var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
  4816 + if (actulalX <= bodyRegionRight && value.X <= actulalX && actualY <= bodyRegionBottom && value.Y <= actualY) {
4515 4817  
4516   - clickedBodyRegion = value.bodyRegionId;
4517   - x = value.X;
4518   - y = value.Y;
4519   - width = value.Width;
4520   - isMirror = value.IsMirror;
4521   - return false;
4522   - }
4523   - })
4524   - }
  4818 + clickedBodyRegion = value.bodyRegionId;
  4819 + x = value.X;
  4820 + y = value.Y;
  4821 + width = value.Width;
  4822 + isMirror = value.IsMirror;
  4823 + return false;
  4824 + }
  4825 + })
  4826 + }
4525 4827  
4526 4828  
4527 4829 if (isMirror == "Yes") {
... ... @@ -4532,110 +4834,69 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4532 4834 var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci';
4533 4835 var clickedCanavs = document.getElementById(clickedCanvasMaskId);
4534 4836  
4535   - //if non mirrored canvas does not exist for this irror Body region then draw non mirrored image to get annotation
4536   - var clickedBodyRegionData = new jinqJs()
4537   - .from(BodyRegionDictionary)
4538   - .where('bodyRegionId == ' + clickedBodyRegion)
4539   - .select();
4540   - if (clickedBodyRegionData != null || clickedBodyRegionData != undefined) {
4541   -
4542   - var nomMirroredBodyRegion = new jinqJs()
4543   - .from(clickedBodyRegionData)
4544   - .where('IsMirror == No')
4545   - .select();
4546   -
4547   -
4548   - //debugger;
4549   - var oldMirrorMaskId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci';
4550   - var oldMirrorMask = document.getElementById(oldMirrorMaskId);
4551   - if (oldMirrorMask != null) {
4552   - document.getElementById('canvasDiv').removeChild(oldMirrorMask);
4553   - }
4554   - var transparencyTempcanavsMask = document.createElement('canvas');
4555   - transparencyTempcanavsMask.id = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci';
4556   - transparencyTempcanavsMask.height = nomMirroredBodyRegion[0].Height;
4557   - transparencyTempcanavsMask.width = nomMirroredBodyRegion[0].Width;
4558   - transparencyTempcanavsMask.style.position = "absolute";
4559   - transparencyTempcanavsMask.style.left = nomMirroredBodyRegion[0].X + 'px' // x + "px";
4560   - transparencyTempcanavsMask.style.top = nomMirroredBodyRegion[0].Y + "px"//y + "px";
4561   - transparencyTempcanavsMask.style.visibility = 'hidden';
4562   -
4563   - document.getElementById('canvasDiv').appendChild(transparencyTempcanavsMask);
4564   -
4565   - var tranparencyImgSrc = $scope.GetImageSource(clickedBodyRegion);
4566   - var tempMaskImg = new Image();
4567   - var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
4568   - tempMaskImg.onload = function () {
4569   - var tempmaskCtx = transparencyTempcanavsMask.getContext('2d');
4570   - tempmaskCtx.drawImage(tempMaskImg, 0, 0);
4571   -
4572   - //get x,y of non mirrored canvas for this body region
4573   - x = transparencyTempcanavsMask.style.left;
4574   - y = transparencyTempcanavsMask.style.top;
4575   -
4576   - var maskCanvasTransId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci';
4577   - var maskCanvastrans = document.getElementById(maskCanvasTransId);
4578   - var maskCanvasContexttrans = maskCanvastrans.getContext("2d");
4579   -
  4837 + var maskCanvasId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci';
  4838 + var maskCanvas = document.getElementById(maskCanvasId);
  4839 +
  4840 + if (maskCanvas != null) {
  4841 + x = maskCanvas.style.left;
  4842 + y = maskCanvas.style.top;
4580 4843  
  4844 + var maskCanvasTransId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci';
  4845 + var maskCanvastrans = document.getElementById(maskCanvasTransId);
  4846 + var maskCanvasContexttrans = maskCanvastrans.getContext("2d");
4581 4847  
4582 4848  
4583   - var canvasDiv = document.getElementById('canvasDiv');
4584   - var verticalScrollPosition = canvasDiv.scrollTop;
4585   - var horizontlScrollPosition = canvasDiv.scrollLeft;
  4849 + getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, maskCanvasContexttrans, clickedBodyRegion, x, y, evt)
4586 4850  
4587   - var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
4588 4851  
4589   - var mirrorXOnNormalImage = parseInt(maskCanvasContexttrans.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage);
  4852 + }
4590 4853  
4591   - var actulalX = mirrorXOnNormalImage
4592   - var actualY = mousePos.y + verticalScrollPosition
  4854 + //if non mirrored canvas does not exist for this irror Body region then draw non mirrored image to get annotation
4593 4855  
  4856 + else if (maskCanvas == null) {
  4857 + var clickedBodyRegionData = new jinqJs()
  4858 + .from(BodyRegionDictionary)
  4859 + .where('bodyRegionId == ' + clickedBodyRegion)
  4860 + .select();
  4861 + if (clickedBodyRegionData != null || clickedBodyRegionData != undefined) {
4594 4862  
  4863 + var nomMirroredBodyRegion = new jinqJs()
  4864 + .from(clickedBodyRegionData)
  4865 + .where('IsMirror == No')
  4866 + .select();
4595 4867  
4596   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci';
4597   - var maskCanvas = document.getElementById(clickedCanvasMaskId);
4598   - var maskCanvasContext = maskCanvas.getContext("2d");
4599   - var imgX = Math.round(actulalX - parseInt(x.replace('px', '')));
4600   - var imgY = Math.round(actualY - parseInt(y.replace('px', '')));
4601   - pixelData = maskCanvasContext.getImageData(imgX, imgY, 1, 1);
  4868 + var transparencyTempcanavsMask = document.createElement('canvas');
  4869 + transparencyTempcanavsMask.id = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci';
  4870 + transparencyTempcanavsMask.height = nomMirroredBodyRegion[0].Height;
  4871 + transparencyTempcanavsMask.width = nomMirroredBodyRegion[0].Width;
  4872 + transparencyTempcanavsMask.style.position = "absolute";
  4873 + transparencyTempcanavsMask.style.left = nomMirroredBodyRegion[0].X + 'px' // x + "px";
  4874 + transparencyTempcanavsMask.style.top = nomMirroredBodyRegion[0].Y + "px"//y + "px";
  4875 + transparencyTempcanavsMask.style.visibility = 'hidden';
4602 4876  
  4877 + document.getElementById('canvasDiv').appendChild(transparencyTempcanavsMask);
4603 4878  
4604   - //trans layer image data
4605   - pixelDataTrans = maskCanvasContexttrans.getImageData(imgX, imgY, 1, 1);
4606   - // console.log('at the time' + pixelData.data[0])
4607   - // debugger;
4608   - var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope);
4609   - if ($('#speechBubble').length > 0)
4610   - $('#speechBubble').remove();
  4879 + var tranparencyImgSrc = $scope.GetImageSource(clickedBodyRegion);
  4880 + var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
4611 4881  
  4882 + var tempMaskImg = new Image();
  4883 + tempMaskImg.src = tranparencyMaskImgSrc;
4612 4884  
4613   - if ($('#speechBubbleTrns').length > 0) {
4614   - $('#speechBubbleTrns').remove();
  4885 + tempMaskImg.onload = function () {
  4886 + var transparencyTempcanavsMask = document.getElementById(maskCanvasId);
  4887 + var tempmaskCtx = transparencyTempcanavsMask.getContext('2d');
  4888 + tempmaskCtx.drawImage(tempMaskImg, 0, 0);
4615 4889  
4616   - // createSpeechBubbleOnTransparencyBox(evt, annotations.annotationT1, annotations.annotationT2, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
  4890 + //get x,y of non mirrored canvas for this body region
  4891 + x = transparencyTempcanavsMask.style.left;
  4892 + y = transparencyTempcanavsMask.style.top;
4617 4893  
4618   - $scope.annotationTextArrayT1 = [];
4619   - $scope.annotationTextArrayT2 = [];
4620   - $scope.annotationTextArrayT1.push(annotations.annotationT1);
4621   - $scope.annotationTextArrayT2.push(annotations.annotationT2);
  4894 + getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, tempmaskCtx, clickedBodyRegion, x, y, evt)
4622 4895  
4623   - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
4624 4896 }
4625   - else
4626   - // createSpeechBubbleOnTransparencyBox(evt, annotations.annotationT1, annotations.annotationT2, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
4627   -
4628   - $scope.annotationTextArrayT1 = [];
4629   - $scope.annotationTextArrayT2 = [];
4630   - $scope.annotationTextArrayT1.push(annotations.annotationT1);
4631   - $scope.annotationTextArrayT2.push(annotations.annotationT2);
4632   -
4633   - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
4634 4897 }
4635   - tempMaskImg.src = "http://localhost/AIAHtml/" + tranparencyMaskImgSrc;
4636   -
4637   -
4638 4898 }
  4899 +
4639 4900  
4640 4901 }
4641 4902 else {
... ... @@ -4672,21 +4933,160 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4672 4933 }
4673 4934 else
4674 4935 // $scope.createSpeechBubbleOnTransparencyBox(evt, annotations.annotationT1, annotations.annotationT2, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
  4936 + {
4675 4937  
  4938 + $scope.annotationTextArrayT1 = [];
  4939 + $scope.annotationTextArrayT2 = [];
  4940 + $scope.annotationTextArrayT1.push(annotations.annotationT1);
  4941 + $scope.annotationTextArrayT2.push(annotations.annotationT2);
  4942 +
  4943 +
  4944 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
  4945 + }
  4946 +
  4947 + }
  4948 +
  4949 +
  4950 + }
  4951 +
  4952 + function OnClickModestyTransCanvas(evt) {
  4953 +
  4954 + var mousePos = $scope.getMousePos(evt);
  4955 + var canvasDiv = document.getElementById('canvasDiv');
  4956 + var verticalScrollPosition = canvasDiv.scrollTop;
  4957 + var horizontlScrollPosition = canvasDiv.scrollLeft;
  4958 +
  4959 + var actulalX = mousePos.x + horizontlScrollPosition;
  4960 + var actualY = mousePos.y + verticalScrollPosition;
  4961 +
  4962 + var canavsX = evt.currentTarget.offsetLeft;
  4963 + var canvasY = evt.currentTarget.offsetTop;
  4964 +
  4965 + var canvasId = evt.currentTarget.id;
  4966 + var canavsContext = document.getElementById(canvasId).getContext('2d');
  4967 + var RGBColor = $scope.GetRGBColor(canavsContext, actulalX, actualY, canavsX, canvasY);
  4968 +
  4969 + var annotationText;
  4970 +
  4971 + //Modesty ON
  4972 + if (canvasId.match('modestyImg') && RGBColor != '000000') {
  4973 + RGBColor = DA[0].figLeafTermId;
  4974 + annotationText = $scope.GetAnnotationBasedOnActualTermNo(RGBColor);
  4975 + $scope.annotationTextArrayT1 = [];
  4976 + $scope.annotationTextArrayT2 = [];
  4977 + $scope.annotationTextArrayT1.push(annotationText);
  4978 + $scope.annotationTextArrayT2.push(annotationText);
  4979 + }
  4980 + //Modesty On but clicked somewhre else, we did modesty check because the modesty image covers whole body region so if user will click to
  4981 + //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er
  4982 + //
  4983 + else if (canvasId.match('modestyImg') && RGBColor == '000000') {
  4984 +
  4985 + var bodyRegionId = canvasId.slice(-1);
  4986 +
  4987 + var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci';
  4988 + var maskCanvas = document.getElementById(maskCanvasId);
  4989 + var maskCanvasContext = maskCanvas.getContext("2d");
  4990 + //RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, xcanavsX, canvasY);
  4991 + //annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
  4992 +
  4993 + //transparecncy canvas
  4994 + var maskCanvasTransId = 'transparencyTempCanvasMask_' + bodyRegionId + '_mci';
  4995 + var maskCanvastrans = document.getElementById(maskCanvasTransId);
  4996 + var maskCanvasContexttrans = maskCanvastrans.getContext("2d");
  4997 +
  4998 + var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - canavsX), Math.round(actualY - canvasY), 1, 1);
  4999 +
  5000 + var pixelDataTrans = maskCanvasContexttrans.getImageData(Math.round(actulalX - canavsX), Math.round(actualY - canvasY), 1, 1);
  5001 +
  5002 + var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope);
  5003 +
  5004 +
  5005 + // var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci';
  5006 + // var maskCanvas = document.getElementById(maskCanvasId);
  5007 + // var maskCanvasContext = maskCanvas.getContext("2d");
  5008 + // RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, xcanavsX, canvasY);
  5009 + // annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
  5010 +
  5011 +
  5012 + // createSpeechBubbleOnTransparencyBox(evt, annotations.annotationT1, annotations.annotationT2, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
4676 5013  
4677 5014 $scope.annotationTextArrayT1 = [];
  5015 + $scope.annotationTextArrayT2 = [];
  5016 + $scope.annotationTextArrayT1.push(annotations.annotationT1);
  5017 + $scope.annotationTextArrayT2.push(annotations.annotationT2);
  5018 +
  5019 + }
  5020 +
  5021 + if ($('#speechBubble').length > 0)
  5022 + $('#speechBubble').remove();
  5023 +
  5024 +
  5025 + if ($('#speechBubbleTrns').length > 0) {
  5026 + $('#speechBubbleTrns').remove();
  5027 + }
  5028 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
  5029 +
  5030 +
  5031 + }
  5032 +
  5033 + function getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, maskCanvasContexttrans, clickedBodyRegion, x, y, evt)
  5034 + {
  5035 + var canvasDiv = document.getElementById('canvasDiv');
  5036 + var verticalScrollPosition = canvasDiv.scrollTop;
  5037 + var horizontlScrollPosition = canvasDiv.scrollLeft;
  5038 +
  5039 + var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(mousePos.x) + horizontlScrollPosition);// - 135);
  5040 +
  5041 + var mirrorXOnNormalImage = parseInt(maskCanvasContexttrans.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage);
  5042 +
  5043 + var actulalX = mirrorXOnNormalImage
  5044 + var actualY = mousePos.y + verticalScrollPosition
  5045 +
  5046 +
  5047 +
  5048 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci';
  5049 + var maskCanvas = document.getElementById(clickedCanvasMaskId);
  5050 + var maskCanvasContext = maskCanvas.getContext("2d");
  5051 + var imgX = Math.round(actulalX - parseInt((x).replace('px', '')));
  5052 + var imgY = Math.round(actualY - parseInt((y).replace('px', '')));
  5053 + var pixelData = maskCanvasContext.getImageData(imgX, imgY, 1, 1);
  5054 +
  5055 +
  5056 + //trans layer image data
  5057 + var pixelDataTrans = maskCanvasContexttrans.getImageData(imgX, imgY, 1, 1);
  5058 + // console.log('at the time' + pixelData.data[0])
  5059 + // debugger;
  5060 + var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope);
  5061 + if ($('#speechBubble').length > 0)
  5062 + $('#speechBubble').remove();
  5063 +
  5064 +
  5065 + if ($('#speechBubbleTrns').length > 0) {
  5066 + $('#speechBubbleTrns').remove();
  5067 +
  5068 + // createSpeechBubbleOnTransparencyBox(evt, annotations.annotationT1, annotations.annotationT2, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left + 5, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top - 50)
  5069 +
  5070 + $scope.annotationTextArrayT1 = [];
4678 5071 $scope.annotationTextArrayT2 = [];
4679 5072 $scope.annotationTextArrayT1.push(annotations.annotationT1);
4680 5073 $scope.annotationTextArrayT2.push(annotations.annotationT2);
4681 5074  
4682   -
4683 5075 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
  5076 + }
  5077 + else
  5078 + {
  5079 + $scope.annotationTextArrayT1 = [];
  5080 + $scope.annotationTextArrayT2 = [];
  5081 + $scope.annotationTextArrayT1.push(annotations.annotationT1);
  5082 + $scope.annotationTextArrayT2.push(annotations.annotationT2);
4684 5083  
4685   -
  5084 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
4686 5085 }
4687   - //debugger;
4688   - }
4689   - function clearTransCanvas() {
  5086 + }
  5087 +
  5088 +
  5089 + function clearTransCanvas() {
4690 5090  
4691 5091 var tCanvas = document.getElementById('transparencyCanvas');
4692 5092 if (tCanvas != null) {
... ... @@ -4812,25 +5212,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4812 5212 ctx.putImageData(originalTransparencyData, 0, 0);
4813 5213  
4814 5214  
4815   - var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
  5215 + //for modesty
4816 5216  
4817   - $scope.IncludedBodyRegions = [];
4818   - var counter = 0;
4819   - $.each(BodyRegionDictionary, function (index, value) {
  5217 + //for modesty
  5218 + if ($rootScope.isModestyOn == true && $scope.modestyImageInfo.length > 0) {
  5219 + $.each($scope.modestyImageInfo, function (index, value) {
4820 5220  
4821   - var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
4822   - var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
4823   -
4824   -
4825   -
4826   - if (tBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && tBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
4827   -
4828   - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, true);
  5221 + var brId = value.bodyRegionId;
4829 5222  
4830   - }
4831   -
4832   - });
  5223 + var modestyTransTempCanvasId = 'tempCanvasModesty_' + brId;
  5224 + var modestyTransCanvasId = 'modestyTransCanavs_' + brId;
  5225 + var tempCanvasContext = document.getElementById(modestyTransTempCanvasId).getContext('2d');
  5226 + var originalTransparencyData = tempCanvasContext.getImageData(0, 0, value.Width, value.Height);
  5227 + var ctx = document.getElementById(modestyTransCanvasId).getContext('2d');
  5228 + ctx.putImageData(originalTransparencyData, 0, 0);
  5229 + })
  5230 + }
4833 5231  
  5232 + $scope.changeTransparency();
4834 5233  
4835 5234  
4836 5235 // });
... ... @@ -4838,9 +5237,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4838 5237  
4839 5238 $scope.CloseTransparencyBox = function () {
4840 5239  
4841   -
  5240 +
4842 5241 //To enable extract button
4843   - $scope.isTransparencyActivated = false;
  5242 + $scope.isTransparencyActivated = false;
4844 5243 $("#btnExtract").removeClass("disabled");
4845 5244  
4846 5245 //$('.com_anno').css('display', 'none');
... ... @@ -4884,7 +5283,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4884 5283 //var scope = angular.element(document.getElementById("DAView")).scope();
4885 5284 //scope.$apply(function () {
4886 5285 // $scope.layerNumber = 0;
4887   - // $scope.isTransparencyActivated = false;
  5286 + // $scope.isTransparencyActivated = false;
4888 5287 //})
4889 5288  
4890 5289  
... ... @@ -4901,6 +5300,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4901 5300 $scope.transNumber = 50;
4902 5301 $(".slider").slider({ value: 50 })
4903 5302 }
  5303 +
  5304 +
  5305 + var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
  5306 + if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
  5307 + for (var j = 0; j < modestyTransCanvases.length; j++) {
  5308 +
  5309 + modestyTransCanvases[j].parentNode.removeChild(modestyTransCanvases[j]);
  5310 + }
  5311 + }
  5312 +
4904 5313 $('#transparencyScale').css('visibility', 'hidden');
4905 5314  
4906 5315 //$scope.isTransparencyActivated = false;
... ... @@ -4957,6 +5366,48 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4957 5366 })
4958 5367 };
4959 5368  
  5369 + $scope.createSpeechBubbleOnTransparencyBox = function (event, text1, text2, x, y) {
  5370 +
  5371 + $('#canvasDiv').css('cursor', 'pointer');
  5372 + $('<div id="speechBubbleTrns" class="BubbleDiv" style="display:visible; top:' + y + 'px; left:' + x + 'px;z-index:700"> <div class="">'
  5373 + + '<div class="Bubble">'
  5374 + + '<div class="BubbleCloseBtn"></div><div class="BubbleContent">' + text1 + '</div><div class="BubbleContent">' + text2 + '</div><div class="bottomLeftArrow"></div>'
  5375 + //+'<div class="bottomRightArrow"></div><div class="topLeftArrow"></div><div class="topRightArrow"></div>
  5376 + + '</div></div></div>').appendTo('#canvasDiv');
  5377 +
  5378 + $('#speechBubbleTrns').on('click', '.BubbleCloseBtn', function (e) {
  5379 + $('#speechBubbleTrns').css('display', 'none');
  5380 + });
  5381 +
  5382 + $('#canvasDiv').attr("data-bubbleid", "speechBubble")
  5383 +
  5384 +
  5385 + };
  5386 +
  5387 +
  5388 + function positionTooltip(event, x, y) {
  5389 + // alert('positionTooltip')
  5390 + x = 100,
  5391 + y = 200,
  5392 +
  5393 + $('div.speech-bubble').css({
  5394 + 'position': 'absolute', 'top': x, 'left': y, 'background-color': '#f8f8f8',
  5395 + 'border': '2px solid #c8c8c8', 'width': '150px', 'height': '50px'
  5396 + });
  5397 +
  5398 +
  5399 + $('.arrow').css({
  5400 + 'border-style': 'solid',
  5401 + 'position': 'absolute'
  5402 + });
  5403 +
  5404 + $('.bottom').css({
  5405 + 'border-color': '#c8c8c8 transparent transparent transparent',
  5406 + 'border-width': ' 8px 8px 0px 8px',
  5407 + 'bottom': -'8px'
  5408 + })
  5409 + };
  5410 +
4960 5411  
4961 5412 $scope.IdentityClick = function () {
4962 5413  
... ... @@ -5897,7 +6348,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5897 6348  
5898 6349 $scope.OnGenderChange = function (event) {
5899 6350  
5900   -
  6351 + var canvasDiv = document.getElementById('canvasDiv');
  6352 + $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
  6353 + $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
5901 6354  
5902 6355 $("#btnExtract").removeClass("disabled");
5903 6356 $("#btnTranparency").removeClass("disabled");
... ... @@ -5922,6 +6375,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5922 6375 if ($rootScope.isExtract == true) {
5923 6376 $rootScope.isExtract = false;
5924 6377 $rootScope.isHighLight = true;
  6378 + $("#btnExtract").removeClass("btn-primary");
  6379 + $("#btnExtract").addClass("btn-black");
  6380 + $("#btnHighLight").removeClass("btn-black");
  6381 + $("#btnHighLight").addClass("btn-primary");
  6382 +
  6383 +
5925 6384 }
5926 6385  
5927 6386  
... ... @@ -6114,6 +6573,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6114 6573  
6115 6574 $scope.OnViewChange = function (event) {
6116 6575  
  6576 + var canvasDiv = document.getElementById('canvasDiv');
  6577 + $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
  6578 + $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
6117 6579  
6118 6580 $("#btnExtract").removeClass("disabled");
6119 6581 $("#btnTranparency").removeClass("disabled");
... ... @@ -6141,8 +6603,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6141 6603 if ($rootScope.isExtract == true) {
6142 6604 $rootScope.isExtract = false;
6143 6605 $rootScope.isHighLight = true;
  6606 + $("#btnExtract").removeClass("btn-primary");
  6607 + $("#btnExtract").addClass("btn-black");
  6608 + $("#btnHighLight").removeClass("btn-black");
  6609 + $("#btnHighLight").addClass("btn-primary");
6144 6610 }
6145   -
  6611 +
6146 6612 $scope.layerNumber = 0;
6147 6613 // debugger;
6148 6614 //var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value];
... ... @@ -6390,15 +6856,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6390 6856  
6391 6857  
6392 6858  
6393   - function OnPaintCanvasMouseMove(event) {
6394 6859  
  6860 + $rootScope.FreeStylePaint = function (e) {
  6861 +
  6862 + var annotationCanvas = document.getElementById("canvas");
  6863 + // document.getElementById("canvasPaint").addEventListener("mouseup", OnPaintBrushCanvasMouseUp);
6395 6864  
  6865 + annotationCanvas.addEventListener('mousedown', $scope.OnPaintCanvasMouseDown, false);
  6866 +
  6867 + annotationCanvas.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false);
6396 6868 }
  6869 + $scope.OnPaintCanvasMouseDown = function (event) {
  6870 + $rootScope.isMousedownOnPaintCanvas = true;
  6871 + $scope.isStartPointDeleted = false;
  6872 + var annotationCanvas = document.getElementById("canvas");
  6873 + $scope.startPageX = parseInt(event.clientX - ($("#canvas").offset().left));
  6874 + $scope.startPageY = parseInt(event.clientY - ($("#canvas").offset().top));
  6875 +
  6876 + annotationCanvas.addEventListener('mousemove', $scope.OnPaintCanvasMouseMove, false);
6397 6877  
6398   - $rootScope.FreeStylePaint = function (e) {
6399 6878  
6400 6879  
6401 6880 }
  6881 + $scope.OnPaintCanvasMouseMove = function (event) {
  6882 +
  6883 +
  6884 + $rootScope.xPage = parseInt(event.clientX - ($("#canvas").offset().left));
  6885 + $rootScope.yPage = parseInt(event.clientY - ($("#canvas").offset().top));
  6886 +
  6887 + var btneraseBrushSizeValue = $("#btnBrushSize").val();
  6888 + $rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue);
  6889 +
  6890 + if ($rootScope.isEraseToolSelected == true && $rootScope.isMousedownOnPaintCanvas == true) {
  6891 +
  6892 + var sktch = $('#canvasPaint').sketch();
  6893 + $('#canvasPaint').sketch().actions = [];
  6894 + var paintCanvas = document.getElementById("canvasPaint");
  6895 + var paintCanvasContext = paintCanvas.getContext('2d');
  6896 + if ($scope.isStartPointDeleted == false) {
  6897 +
  6898 + paintCanvasContext.clearRect($scope.startPageX, $scope.startPageY, $rootScope.eraseshapeSize, $rootScope.eraseshapeSize);
  6899 +
  6900 + $scope.isStartPointDeleted = true;
  6901 + }
  6902 +
  6903 + paintCanvasContext.clearRect($rootScope.xPage, $rootScope.yPage, $rootScope.eraseshapeSize, $rootScope.eraseshapeSize);
  6904 +
  6905 +
  6906 + }
  6907 + }
6402 6908 $scope.OnPaintBrushCanvasMouseDown = function (event) {
6403 6909 switch ($rootScope.shapeType) {
6404 6910  
... ... @@ -6427,7 +6933,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6427 6933 }
6428 6934 }
6429 6935 $scope.OnPaintBrushCanvasMouseUp = function (event) {
6430   -
  6936 + $rootScope.isMousedownOnPaintCanvas = false;
  6937 + $rootScope.isEraseToolSelected = false;
6431 6938  
6432 6939 // var canvasElement1 = document.getElementById("canvasPaint");
6433 6940 // var ctx1 = canvasElement1.getContext("2d");
... ... @@ -6801,7 +7308,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6801 7308 }
6802 7309  
6803 7310 $scope.jumpToTerm = function (event) {
6804   -
  7311 + // alert(event.currentTarget.value);
  7312 + $rootScope.searchSelectedText = $('#'+ event.currentTarget.id).text();
  7313 + $('#termList option[selected="selected"]').prop("selected", false);
  7314 + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
  7315 + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  7316 + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
6805 7317 $rootScope.isLoading = true;
6806 7318  
6807 7319 $('#spinner').css('visibility', 'visible');
... ... @@ -6809,7 +7321,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6809 7321 $scope.searchFilter = event.currentTarget.innerHTML;
6810 7322  
6811 7323 //2.
6812   - $scope.HighlightBodyOnListManagerSelection(event);
  7324 + $scope.HighlightBodyOnListManagerSelection(event.currentTarget.id);
6813 7325  
6814 7326 $scope.IsSearchVisible = false;
6815 7327 $rootScope.isNormalMode = false;
... ... @@ -6860,11 +7372,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6860 7372  
6861 7373 //list manager
6862 7374 $scope.$on('listManagerEvent', function (event, data) {
6863   -
6864   - if ($rootScope.disableAnnotationtoolOnListManager == true)
6865   - {
6866   - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
6867   - $('#slider-range-min-2').slider('disable');
  7375 +
  7376 +
  7377 + //if ($rootScope.MenuModuleName == "DA") {
  7378 + // if ($rootScope.disableAnnotationtoolOnListManager == true) {
  7379 + // $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  7380 + // $('#slider-range-min-2').slider('disable');
  7381 + // }
  7382 + //}
6868 7383 if ($rootScope.setListManagerZindex == true)
6869 7384 {
6870 7385 var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x
... ... @@ -6886,7 +7401,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6886 7401 }
6887 7402  
6888 7403 }
6889   - }
  7404 +
6890 7405  
6891 7406  
6892 7407  
... ... @@ -6900,12 +7415,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6900 7415 $('#bodySystems').empty();
6901 7416  
6902 7417  
6903   - var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems');
  7418 + var $all = $('<option id="0" selected="">All</option>').appendTo('#bodySystems');
6904 7419 $compile($all)($scope);
6905 7420  
6906 7421 angular.forEach(systemList, function (value, key) {
6907 7422  
6908   - var $elem = $('<option ng-click=refreshTermListOnSystemSelection($event) id="' + value._BodySystemId + '" title="' + value._Name + '" >' + value._Name + '</option>').appendTo('#bodySystems');
  7423 + var $elem = $('<option id="' + value._BodySystemId + '" title="' + value._Name + '" >' + value._Name + '</option>').appendTo('#bodySystems');
6909 7424 $compile($elem)($scope);
6910 7425 })
6911 7426  
... ... @@ -6979,7 +7494,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6979 7494  
6980 7495  
6981 7496 for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
6982   - var $el = $('<option title ="'+ $scope.VocabTermTxt[j]._TermText+ '" ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
  7497 + var $el = $('<option title ="' + $scope.VocabTermTxt[j]._TermText + '" id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
6983 7498 $compile($el)($scope);
6984 7499  
6985 7500 }
... ... @@ -6997,9 +7512,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6997 7512 }
6998 7513  
6999 7514  
7000   - $scope.HighlightBodyOnListManagerSelection = function (event) {
  7515 + $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber) {
  7516 +
  7517 + console.log('inside HighlightBodyOnListManagerSelection actualTermNumber= ' + actualTermNumber)
7001 7518 // Terms search in the Search list should be disable in the List Manager and Vice-Versa.
7002   - if ($rootScope.prevId == event.currentTarget.id) {
  7519 + if ($rootScope.prevId == actualTermNumber) {
7003 7520  
7004 7521 $rootScope.isLoading = false;
7005 7522 $('#spinner').css('visibility', 'hidden');
... ... @@ -7011,12 +7528,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7011 7528 $('#spinner').css('visibility', 'visible');
7012 7529  
7013 7530  
7014   - $rootScope.prevId = event.currentTarget.id;
7015   - $("#termList").find("option").attr('selected', false);
  7531 + $rootScope.prevId = actualTermNumber;
  7532 + // $("#termList").find("option").attr('selected', false);
7016 7533 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
7017   - $("#termList").find("option[id=" + event.currentTarget.id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  7534 + $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
7018 7535 $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
7019   - $("div#backdrop #termlistfilter li").find("a[id=" + event.currentTarget.id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  7536 + $("div#backdrop #termlistfilter li").find("a[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  7537 +
7020 7538 $scope.terminateCurrentlyRunningWPs();
7021 7539 //debugger
7022 7540 $rootScope.isListManagerSelected = true;
... ... @@ -7037,7 +7555,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7037 7555 $rootScope.isHighlightBodyByBodySystem = false;
7038 7556  
7039 7557 //1.
7040   - $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value;
  7558 + $rootScope.actualTermNumber = actualTermNumber;//attributes[0].value;
7041 7559 console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber)
7042 7560  
7043 7561 //2.
... ... @@ -7233,11 +7751,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7233 7751  
7234 7752 $scope.aligneCanvasWithTerm = function () {
7235 7753 console.log('aligneCanvasWithTerm')
  7754 + // debugger
  7755 +
7236 7756 var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
7237 7757 var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
7238   -
7239   - var canvasX = parseInt($('#canvasDiv').css('left'));
7240   - var canvasY = parseInt($('#canvasDiv').css('top'));
  7758 +
  7759 + var canvasX = parseInt(document.getElementById('canvasDiv').offsetLeft);
  7760 + var canvasY = parseInt(document.getElementById('canvasDiv').offsetTop);
7241 7761 var canvasHeight = $('#canvasDiv').height();
7242 7762 var canvasWidth = $('#canvasDiv').width();
7243 7763  
... ... @@ -7265,7 +7785,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7265 7785 else {
7266 7786 newX = maxHScrollPos;
7267 7787 }
7268   -
  7788 + //alert('newX= ' + newX + ',newY= ' + newY)
7269 7789 $('#canvasDiv').scrollLeft(newX);
7270 7790 $('#canvasDiv').scrollTop(newY);
7271 7791 $scope.isLoading = false;
... ... @@ -7284,12 +7804,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7284 7804 return Math.round(iReturnValue / nExistingZoom);
7285 7805 }
7286 7806  
7287   - $scope.refreshTermListOnSystemSelection = function (event) {
  7807 + $scope.refreshTermListOnSystemSelection = function (bodysystemId) {
7288 7808  
7289 7809 $('#termList').empty();
7290 7810 // $('#termList').innerHTML = '';
7291 7811  
7292   - if (event.currentTarget.id == 0) {
  7812 + if (bodysystemId == 0) {
7293 7813 $scope.loadListManger();
7294 7814 }
7295 7815 else {
... ... @@ -7301,7 +7821,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7301 7821 $rootScope.BodySystemData = result;
7302 7822 var systemMatchedTermList = new jinqJs()
7303 7823 .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
7304   - .where('_SystemNumber == ' + event.currentTarget.id)
  7824 + .where('_SystemNumber == ' + bodysystemId)
7305 7825 .select();
7306 7826 if (systemMatchedTermList != null || systemMatchedTermList != undefined) {
7307 7827  
... ... @@ -7371,7 +7891,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7371 7891  
7372 7892  
7373 7893 for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
7374   - var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
  7894 + var $el = $('<option id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
7375 7895 $compile($el)($scope);
7376 7896 }
7377 7897  
... ... @@ -7471,6 +7991,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7471 7991 }
7472 7992  
7473 7993  
  7994 + $rootScope.mouseMoveToolTip = function (toolTipTopPosition, toolTipLeftPosition, toolTipWidth, toolTipText) {
  7995 +
  7996 + $("#cursor-block").addClass("custom-tooltip-annotation-toolbar");
  7997 + $(".custom-tooltip-annotation-toolbar").css({ "display": "block", "top": toolTipTopPosition + "px", "width": toolTipWidth + "px", "left": toolTipLeftPosition + "px" });
  7998 + $("#cursor-block").html(toolTipText);
  7999 + }
  8000 +
  8001 + $rootScope.mouseOutToolTip = function () {
  8002 +
  8003 + $(".custom-tooltip-annotation-toolbar").css('display', 'none');
  8004 + $("#cursor-block").removeClass("custom-tooltip-annotation-toolbar");
  8005 + $("#cursor-block").html();
  8006 +
  8007 + }
  8008 +
  8009 +
7474 8010  
7475 8011 }]
7476 8012  
... ... @@ -7532,11 +8068,11 @@ function HighlightBodyOnListManager(event) {
7532 8068 });
7533 8069 }
7534 8070  
7535   -function refreshTermListOnSystem(event) {
  8071 +function refreshTermListOnSystem(bodysystemId) {
7536 8072 console.log('refreshTermListOnSystem is called outside ');
7537 8073 var scope = angular.element(document.getElementById("daView")).scope();
7538 8074 scope.$apply(function () {
7539   - scope.refreshTermListOnSystemSelection(event);
  8075 + scope.refreshTermListOnSystemSelection(bodysystemId);
7540 8076 });
7541 8077 }
7542 8078  
... ... @@ -7602,4 +8138,15 @@ function OnZoom()
7602 8138 scope.$apply(function () {
7603 8139 scope.enableZoom();
7604 8140 });
7605   -}
7606 8141 \ No newline at end of file
  8142 +}
  8143 +
  8144 +function onListManagerTermSelection(id) {
  8145 +
  8146 + var scope = angular.element(document.getElementById("daView")).scope();
  8147 + scope.$apply(function () {
  8148 + scope.HighlightBodyOnListManagerSelection(id);
  8149 + });
  8150 +
  8151 +}
  8152 +
  8153 +
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -62,7 +62,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
62 62 $rootScope.TextRectangleArr = [];
63 63 $rootScope.rectDimension = [];
64 64  
65   -
  65 + $rootScope.isEraseToolSelected = false;
  66 + $rootScope.isMousedownOnPaintCanvas = false;
66 67  
67 68 $rootScope.$on("$locationChangeSuccess", function () {
68 69  
... ... @@ -80,14 +81,13 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
80 81 $rootScope.CloseListManager();
81 82 angular.element('#modal-settings').modal('hide');
82 83 if ($location.url() == "/lab-exercises") {
83   -
  84 +
84 85 $rootScope.menuLabExer = 0;
85 86 }
86   - if($rootScope.menuLabExer==1)
87   - {
  87 + if ($rootScope.menuLabExer == 1) {
88 88 $rootScope.disableMenuoption = " ";
89 89 }
90   -
  90 +
91 91 }
92 92  
93 93 });
... ... @@ -140,15 +140,15 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
140 140 }
141 141 }
142 142  
143   - // $rootScope.DrawLine = function () {
144   - //$rootScope.isIdetifyClicked = false;
145   - //$rootScope.isDrawingToolSelected = true;
146   - //$rootScope.isLineDrawSelecyed = true;
147   - // $rootScope.shapeType = "Line";
148   - // alert($rootScope.shapeType);
  143 + // $rootScope.DrawLine = function () {
  144 + //$rootScope.isIdetifyClicked = false;
  145 + //$rootScope.isDrawingToolSelected = true;
  146 + //$rootScope.isLineDrawSelecyed = true;
  147 + // $rootScope.shapeType = "Line";
  148 + // alert($rootScope.shapeType);
149 149  
150 150  
151   - // }
  151 + // }
152 152  
153 153 $rootScope.ClearIframe = function () {
154 154 if ($('#daImagePanel') != null)
... ... @@ -169,7 +169,20 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
169 169 //annotation tool custom events
170 170 $rootScope.ShowAnnotationWindow = function () {
171 171 //7904
  172 + if ($rootScope.MenuModuleName == "DA") {
  173 + if ($rootScope.disableAnnotationtoolOnListManager == true) {
  174 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  175 + $('#slider-range-min-2').slider('disable');
172 176  
  177 + // $rootScope.disableAnnotationTB = false;
  178 + } else {
  179 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
  180 + $('#slider-range-min-2').slider('enable');
  181 + }
  182 + // document.getElementById('modelbackground').style.display = "block";
  183 + // document.getElementById('modeleditstyle').style.display = "block";
  184 +
  185 + }
173 186 $("#OnIdentify").addClass("annotationtoolbartab");
174 187 $("#annotationToolBarOptions").addClass("active");
175 188 $("#annotationButton").addClass("active");
... ... @@ -179,7 +192,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
179 192 $rootScope.$broadcast('annotationToolEvent', true);
180 193 $("#canvasPaint").css("display", "none");
181 194 $("#canvas").css("display", "none");
182   -
  195 +
183 196 var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json';
184 197 if ($rootScope.isFontFamilyLoaded == false) {
185 198  
... ... @@ -193,8 +206,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
193 206  
194 207 for (var i = 0; i <= $rootScope.AnnotationFontFamily.FontFamily.length - 1; i++) {
195 208  
196   - $("#selected-font-family").append("<option>" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + "</option>");
197   -
  209 + $("#selected-font-family").append("<option value=" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + ">" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + "</option>");
  210 +
198 211 }
199 212 $rootScope.isFontFamilyLoaded = true;
200 213  
... ... @@ -231,7 +244,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
231 244 $("#DrawMode").removeClass("annotationtoolbartab");
232 245 // $rootScope.isIdetifyClicked = true;
233 246 // $rootScope.isDrawingToolSelected = false;
234   - // debugger;
  247 + // debugger;
235 248 if ($rootScope.CIAnotationIdentifyModeOff == true) {
236 249 $('.btnCursor').removeClass('activebtncolor');
237 250  
... ... @@ -273,19 +286,19 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
273 286  
274 287  
275 288 //----Annotation Toolbar: Jcanvas-----
276   -
  289 +
277 290 $rootScope.DrLine = function (e) {
278 291 $rootScope.setListManagerZindex = true;
279 292 $("#canvasPaint").css("display", "block");
280 293 $("#canvas").css("display", "block");
281   -
  294 +
282 295 $rootScope.switchCanvas();
283 296 $rootScope.shapeType = "Line";
284   -
  297 +
285 298  
286 299 $('.btnCursor').removeClass('activebtncolor');
287   - $(".btn-annotation").removeClass("activebtncolor");
288   - $(".btn-annotation-line").addClass("activebtncolor");
  300 + $(".btn-annotation").removeClass("activebtncolor");
  301 + $(".btn-annotation-line").addClass("activebtncolor");
289 302  
290 303  
291 304 }
... ... @@ -314,7 +327,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
314 327 $('.btnCursor').addClass('activebtncolor');
315 328 }
316 329  
317   -
  330 +
318 331 $rootScope.DrawRectangle = function (e) {
319 332 $rootScope.setListManagerZindex = true;
320 333 $("#canvasPaint").css("display", "block");
... ... @@ -333,13 +346,17 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
333 346 $("#canvas").css("display", "block");
334 347 $rootScope.switchCanvasToPaintCanvas();
335 348 $rootScope.shapeType = "FreeStylePaint";
336   - var a = $("#amount-2").val();
337   - $rootScope.shapeSize = parseInt(a);
  349 + var btnBrushSizeValue = $("#btnBrushSize").val();
  350 + $rootScope.shapeSize = parseInt(btnBrushSizeValue);
  351 + $("#annotationpaintbrushsize").attr("data-size", $rootScope.shapeSize);
  352 +
  353 + $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleFillColor);
  354 +
338 355 if ($rootScope.shapeSize == '') {
339 356 $('#canvasPaint').sketch({ defaultSize: 1 });
340 357 }
341 358 else {
342   - $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize });
  359 + $('#canvasPaint').sketch();
343 360  
344 361 }
345 362  
... ... @@ -385,7 +402,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
385 402 $(".btn-annotation-arrow").addClass("activebtncolor");
386 403 }
387 404 $rootScope.DrawText = function () {
388   -
  405 +
389 406 $rootScope.setListManagerZindex = true;
390 407 $("#canvasPaint").css("display", "block");
391 408 $("#canvas").css("display", "block");
... ... @@ -424,14 +441,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
424 441 $('#canvas').css("z-index", y);
425 442 }
426 443 $rootScope.EraseDrawing = function () {
427   - $rootScope.switchCanvasToPaintCanvas();
428   - // $('#canvasPaint').sketch({ defaultColor: "yellow", defaultSize: 1 });
429   - var sktch = $('#canvasPaint').sketch();
430   - $('#canvasPaint').sketch().actions = []; // this line empties the actions.
431   - var myCanvas = document.getElementById("canvasPaint");
432   - var ctx = myCanvas.getContext('2d');
433   - ctx.clearRect(0, 0, myCanvas.width, myCanvas.height);
434 444 $rootScope.switchCanvas();
  445 + $rootScope.isEraseToolSelected = true;
  446 + //$rootScope.switchCanvasToPaintCanvas();
  447 + //// $('#canvasPaint').sketch({ defaultColor: "yellow", defaultSize: 1 });
  448 + //var sktch = $('#canvasPaint').sketch();
  449 + //$('#canvasPaint').sketch().actions = []; // this line empties the actions.
  450 + //var myCanvas = document.getElementById("canvasPaint");
  451 + //var ctx = myCanvas.getContext('2d');
  452 + //ctx.clearRect(0, 0, myCanvas.width, myCanvas.height);
  453 + //$rootScope.switchCanvas();
435 454  
436 455 }
437 456  
... ... @@ -442,7 +461,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
442 461 $rootScope.shapestyleborderWidth = 2;
443 462 $rootScope.shapestyleborderStyles = "solid";
444 463 $rootScope.shapestyle = function (id) {
445   - // debugger;
  464 + // debugger;
446 465 document.getElementById('modelbackground').style.display = "none";
447 466 document.getElementById('modeleditstyle').style.display = "none";
448 467  
... ... @@ -468,7 +487,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
468 487 // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
469 488  
470 489 //Edit Shape Style popup should open at it's default position
471   - $("#modeleditstyle").css({ "left": "40%", "right": "0", "top":"70px"});
  490 + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
472 491  
473 492 }
474 493  
... ... @@ -513,7 +532,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
513 532 document.getElementById('modelbackground').style.display = "none";
514 533 document.getElementById('modeleditstyle').style.display = "none";
515 534 //Edit Shape Style popup should open at it's default position
516   - $("#modeleditstyle").css({"left":"40%", "right":"0", "top":"70px"});
  535 + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
517 536  
518 537  
519 538 }
... ... @@ -522,8 +541,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
522 541 //----End-------------
523 542  
524 543 //--Common code of Annotation Toolbar for CI and DA-------
525   - $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y)
526   - {
  544 + $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
527 545 $(canvasId).addLayer({
528 546 name: 'Line_' + LineNumber,
529 547 layer: true,
... ... @@ -532,8 +550,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
532 550 strokeStyle: shapestyleborderColor,
533 551 strokeWidth: shapestyleborderWidth,
534 552 rounded: true,
535   - x1: offsetX1, y1:offsetY1,
536   - x2: x, y2:y,
  553 + x1: offsetX1, y1: offsetY1,
  554 + x2: x, y2: y,
537 555  
538 556 click: function (layer) {
539 557 $rootScope.canvasLayerNameCollection = [];
... ... @@ -586,7 +604,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
586 604 $('.btnCursor').addClass('activebtncolor');
587 605 }
588 606  
589   - $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x,y) {
  607 + $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
590 608 $(canvasId).addLayer({
591 609 layer: true,
592 610 name: 'Rect_' + RectNumber,
... ... @@ -673,7 +691,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
673 691 strokeStyle: shapestyleborderColor,
674 692 strokeWidth: shapestyleborderWidth,
675 693 fillStyle: shapestyleFillColor,
676   - x: offsetX1, y:offsetY1,
  694 + x: offsetX1, y: offsetY1,
677 695 width: (x - offsetX1) * 2, height: (y - offsetY1) * 2,
678 696 // Place a handle at each side and each corner
679 697 handlePlacement: 'both',
... ... @@ -801,118 +819,125 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
801 819 }
802 820  
803 821 $rootScope.PinFn = function (canvasId, PinNumber, offsetX1, offsetY1, x, y, PinArcNumber) {
804   - var radial = $('#canvas').createGradient({
805   - x1: 50, y1: 50,
806   - x2: 50, y2: 50,
807   - r1: 10, r2: 30,
808   - c1: 'rgba(100, 50, 0,0)',
809   - c2: 'grey'
810   - });
811   - $(canvasId).drawLine({
812   - draggable: true,
813   - layer: true,
814   - name: "Pin_" + PinNumber,
815   - groups: ["Pin_" + PinNumber],
816   - dragGroups: ["Pin_" + PinNumber],
817   - strokeStyle: 'black',
818   - strokeWidth: 2,
819   - x1: offsetX1, y1: offsetY1,
820   - x2: x, y2: y,
821   -
822   - click: function (layer) {
823   -
824   - $rootScope.shapeTypePin = "Pin";
825   - $rootScope.canvasLayerNameCollection = [];
826   - var pinLine_layer = layer.name;
827   - var pinLine_layer_split = pinLine_layer.split("_");
828   - var pinArcName = "ArcPin_";
829   - var pinResult = pinArcName.concat(pinLine_layer_split[1]);
830   -
831   - $rootScope.canvasLayerNameCollection.push({ pinName: layer.name, ArcName: pinResult });
832   -
833   - $(canvasId).setLayer(layer.name, {
834   - handle: {
835   - type: 'arc',
836   - fillStyle: '#fff',
837   - strokeStyle: '#c33',
838   - strokeWidth: 2,
839   - // width: 5, height: 5,
840   - radius: 3
841   - }
842   - }).drawLayers();
843   -
844   -
845   - },
846   - mouseout: function (layer) {
847   -
848   - $rootScope.canvasLayerNameCollection = [];
849   - $(canvasId).setLayer(layer.name, {
850   - handle: {
851   - type: 'arc',
852   - fillStyle: '#fff',
853   - strokeStyle: '#c33',
854   - strokeWidth: 0,
855   - // width: 0, height: 0,
856   - radius: 0
857   - }
858   -
859   - }).drawLayers();
860   -
861   - },
862   - mouseover: function (layer) {
863   -
864   -
865   - $(canvasId).setLayer(layer.name, {
866   - handle: {
867   - type: 'arc',
868   - fillStyle: '#fff',
869   - strokeStyle: '#c33',
870   - strokeWidth: 2,
871   - // width: 5, height: 5,
872   - radius: 3
873   - }
874   - }).drawLayers();
  822 +
  823 + var xAxisPinDiff = offsetX1 - x;
  824 + var yAxisPinDiff = offsetY1 - y;
  825 + if (xAxisPinDiff != 0 && yAxisPinDiff != 0)
  826 + {
  827 + var radial = $('#canvas').createGradient({
  828 + x1: 50, y1: 50,
  829 + x2: 50, y2: 50,
  830 + r1: 10, r2: 30,
  831 + c1: 'rgba(100, 50, 0,0)',
  832 + c2: 'grey'
  833 + });
  834 + $(canvasId).drawLine({
  835 + draggable: true,
  836 + layer: true,
  837 + name: "Pin_" + PinNumber,
  838 + groups: ["Pin_" + PinNumber],
  839 + dragGroups: ["Pin_" + PinNumber],
  840 + strokeStyle: 'black',
  841 + strokeWidth: 2,
  842 + x1: offsetX1, y1: offsetY1,
  843 + x2: x, y2: y,
  844 +
  845 + click: function (layer) {
  846 +
  847 + $rootScope.shapeTypePin = "Pin";
  848 + $rootScope.canvasLayerNameCollection = [];
  849 + var pinLine_layer = layer.name;
  850 + var pinLine_layer_split = pinLine_layer.split("_");
  851 + var pinArcName = "ArcPin_";
  852 + var pinResult = pinArcName.concat(pinLine_layer_split[1]);
  853 +
  854 + $rootScope.canvasLayerNameCollection.push({ pinName: layer.name, ArcName: pinResult });
  855 +
  856 + $(canvasId).setLayer(layer.name, {
  857 + handle: {
  858 + type: 'arc',
  859 + fillStyle: '#fff',
  860 + strokeStyle: '#c33',
  861 + strokeWidth: 2,
  862 + // width: 5, height: 5,
  863 + radius: 3
  864 + }
  865 + }).drawLayers();
  866 +
  867 +
  868 + },
  869 + mouseout: function (layer) {
  870 +
  871 + $rootScope.canvasLayerNameCollection = [];
  872 + $(canvasId).setLayer(layer.name, {
  873 + handle: {
  874 + type: 'arc',
  875 + fillStyle: '#fff',
  876 + strokeStyle: '#c33',
  877 + strokeWidth: 0,
  878 + // width: 0, height: 0,
  879 + radius: 0
  880 + }
  881 +
  882 + }).drawLayers();
  883 +
  884 + },
  885 + mouseover: function (layer) {
  886 +
  887 +
  888 + $(canvasId).setLayer(layer.name, {
  889 + handle: {
  890 + type: 'arc',
  891 + fillStyle: '#fff',
  892 + strokeStyle: '#c33',
  893 + strokeWidth: 2,
  894 + // width: 5, height: 5,
  895 + radius: 3
  896 + }
  897 + }).drawLayers();
875 898  
876   - }
877   - }).drawArc({
878   - draggable: true,
879   - name: "ArcPin_" + PinArcNumber,
880   - // name: "Pin_" + $rootScope.resetPin,
881   - layer: true,
882   - groups: ["Pin_" + PinNumber],
883   - dragGroups: ["Pin_" + PinNumber],
884   - strokeStyle: 'grey',
885   - strokeWidth: 2,
886   - fillStyle: radial,
887   - x: offsetX1, y: offsetY1,
888   - radius: 5,
889   - //handle: {
890   - // type: 'arc',
891   - // fillStyle: '#fff',
892   - // strokeStyle: '#c33',
893   - // strokeWidth: 2,
894   - // radius: 3
895   - //},
  899 + }
  900 + }).drawArc({
  901 + draggable: true,
  902 + name: "ArcPin_" + PinArcNumber,
  903 + // name: "Pin_" + $rootScope.resetPin,
  904 + layer: true,
  905 + groups: ["Pin_" + PinNumber],
  906 + dragGroups: ["Pin_" + PinNumber],
  907 + strokeStyle: 'grey',
  908 + strokeWidth: 2,
  909 + fillStyle: radial,
  910 + x: offsetX1, y: offsetY1,
  911 + radius: 5,
  912 + //handle: {
  913 + // type: 'arc',
  914 + // fillStyle: '#fff',
  915 + // strokeStyle: '#c33',
  916 + // strokeWidth: 2,
  917 + // radius: 3
  918 + //},
896 919  
897   - add: function (layer) {
  920 + add: function (layer) {
898 921  
899   - $rootScope.PinArcNumber = layer.name;
900   - // $scope.arr = [];
  922 + $rootScope.PinArcNumber = layer.name;
  923 + // $scope.arr = [];
901 924  
902 925  
903   - },
  926 + },
904 927  
905   - }).drawLayers();
  928 + }).drawLayers();
  929 + }
  930 +
906 931 $('.btnCursor').trigger('click');
907 932 $(".btn-annotation").removeClass("activebtncolor");
908 933 $('.btnCursor').addClass('activebtncolor');
909 934 }
910 935  
911   - $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor,x,y) {
  936 + $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) {
912 937  
913 938  
914   -
915   -
  939 + debugger;
  940 +
916 941 $('#canvas').drawText({
917 942 layer: true,
918 943 draggable: true,
... ... @@ -971,7 +996,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
971 996  
972 997 },
973 998 dblclick: function (layer) {
974   -
  999 +
975 1000 $rootScope.IsTextAlreadySave = false;
976 1001 var RectNameArray = (layer.name).split("_");
977 1002  
... ... @@ -986,10 +1011,13 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
986 1011 $("#annotationTextModal").modal("toggle");
987 1012  
988 1013 $("#text_area").val('');
989   - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1014 + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
990 1015 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
991 1016 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
992 1017  
  1018 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1019 + $("#selected-font-size option:eq(0)").prop('selected', true);
  1020 +
993 1021 $("#text-italic").removeClass("ActiveFormattingButtonClass");
994 1022  
995 1023 $("#text-bold").removeClass("ActiveFormattingButtonClass");
... ... @@ -1033,9 +1061,9 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1033 1061  
1034 1062 }
1035 1063 });
1036   - // Annotation: Edit Text option is missing.
1037   - // alert($rootScope.CurrentWidth);
1038   - // alert($rootScope.CurrentHeight);
  1064 + // Annotation: Edit Text option is missing.
  1065 + // alert($rootScope.CurrentWidth);
  1066 + // alert($rootScope.CurrentHeight);
1039 1067 $("#annotationTextModal").css("padding-right", "0px");
1040 1068 if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) {
1041 1069 $("#annotationTextModal").modal("toggle");
... ... @@ -1046,7 +1074,12 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1046 1074  
1047 1075 $("#text_area").val('');
1048 1076  
1049   - $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1077 + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1078 +
  1079 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1080 + $("#selected-font-size option:eq(0)").prop('selected', true);
  1081 +
  1082 + // $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
1050 1083  
1051 1084 $("#text-italic").removeClass("ActiveFormattingButtonClass");
1052 1085  
... ... @@ -1065,7 +1098,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1065 1098 $('.btnCursor').addClass('activebtncolor');
1066 1099  
1067 1100  
1068   -
  1101 +
1069 1102 }
1070 1103  
1071 1104  
... ... @@ -1093,7 +1126,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1093 1126 ctx.clearRect(0, 0, 2277, 3248);
1094 1127 $rootScope.clicked = true;
1095 1128  
1096   - // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1);
  1129 + // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1);
1097 1130 }
1098 1131  
1099 1132 $rootScope.rectNumber = 0;
... ... @@ -1121,8 +1154,10 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1121 1154 $rootScope.clicked = false;
1122 1155 $rootScope.x = 0;
1123 1156 $rootScope.y = 0;
1124   - $rootScope.x = parseInt(event.clientX - ($("#canvas").offset().left));
1125   - $rootScope.y = parseInt(event.clientY - ($("#canvas").offset().top));
  1157 +
  1158 + $rootScope.x = parseInt(event.clientX - ($("#canvas").offset().left));
  1159 + $rootScope.y = parseInt(event.clientY - ($("#canvas").offset().top));
  1160 +
1126 1161  
1127 1162 var canvasElement = document.getElementById("canvas");
1128 1163 var ctx = canvasElement.getContext("2d");
... ... @@ -1175,7 +1210,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1175 1210  
1176 1211 break;
1177 1212 case "TextArea":
1178   -
  1213 +
1179 1214 $rootScope.IsTextAlreadySave = false;
1180 1215 $("#text_area").val('');
1181 1216 // Draw text
... ... @@ -1194,13 +1229,14 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1194 1229 }
1195 1230  
1196 1231  
1197   -
  1232 +
1198 1233  
1199 1234  
1200 1235  
1201 1236 ///-----
1202 1237  
1203 1238 $rootScope.saveText = function () {
  1239 + debugger;
1204 1240 document.getElementById('modelbackground').style.display = "none";
1205 1241 // this part will work first time when save button will be clicked
1206 1242 if ($rootScope.IsTextAlreadySave == false) {
... ... @@ -1282,7 +1318,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1282 1318 }).drawLayers();
1283 1319 },
1284 1320 dblclick: function (layer) {
1285   -
  1321 +
1286 1322 $rootScope.isTextAreaClosedButtonActive = false;
1287 1323 $rootScope.IsTextAlreadySave = true;
1288 1324  
... ... @@ -1333,7 +1369,15 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1333 1369 $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration);
1334 1370 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor });
1335 1371  
  1372 + var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily;
  1373 + // alert(CurrentFontFamily);
  1374 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  1375 + var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize);
  1376 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  1377 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
1336 1378  
  1379 + CurrentFontFamily = '';
  1380 + CurrentFontSize = '';
1337 1381  
1338 1382 // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" });
1339 1383 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
... ... @@ -1442,7 +1486,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1442 1486 document.getElementById('modelbackground').style.display = "block";
1443 1487 $("#annotationTextModal").modal("toggle");
1444 1488  
1445   -
  1489 + // $("#selected-font-family").val(CurrentFontFamily);
  1490 + // $("#selected-font-size").val(CurrentFontSize);
1446 1491  
1447 1492  
1448 1493 },
... ... @@ -1474,7 +1519,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1474 1519 }
1475 1520 });
1476 1521 $("#text_area").val('');
1477   - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1522 + $("#text_area").css({ " font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1523 +
  1524 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1525 + $("#selected-font-size option:eq(0)").prop('selected', true);
  1526 +
  1527 + // $("#selected-font-family option:eq(0)").prop('selected', true);
  1528 + // $("#selected-font-size option:eq(0)").prop('selected', true);
  1529 +
  1530 + // $("#selected-font-family option[value='Arial']").prop('selected', true);
  1531 + // $("#selected-font-size option[value=14]").prop('selected', true);
1478 1532  
1479 1533 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
1480 1534 $("#text-italic").removeClass("ActiveFormattingButtonClass");
... ... @@ -1568,8 +1622,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1568 1622  
1569 1623 },
1570 1624 dblclick: function (layer) {
1571   -
1572   -
  1625 +
  1626 +
1573 1627 $rootScope.isTextAreaClosedButtonActive = false;
1574 1628 $rootScope.IsTextAlreadySave = true;
1575 1629 var _rectLayerOnSave = layer.name;
... ... @@ -1591,9 +1645,19 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1591 1645 $("#text_area").css("font-family", _modifiedFontFamily);
1592 1646 $("#text_area").css("text-decoration", _modifiedFontDecoration);
1593 1647 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
  1648 +
1594 1649 // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
1595 1650 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
1596 1651  
  1652 + //khushbu
  1653 + var CurrentFontFamily = _modifiedFontFamily;
  1654 + // alert(CurrentFontFamily);
  1655 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  1656 + var CurrentFontSize = parseInt(_modifiedFontSize);
  1657 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  1658 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
  1659 + CurrentFontFamily = '';
  1660 + CurrentFontSize = '';
1597 1661 //adding text text decoration active class in text edit pop-up
1598 1662 if (_modifiedFontDecoration == "underline") {
1599 1663 $("#text-underline").addClass("ActiveFormattingButtonClass");
... ... @@ -1680,16 +1744,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1680 1744  
1681 1745 $rootScope.BindCanvasDrawingListners = function (event) {
1682 1746  
1683   - $rootScope.clicked = true;
1684   - // OnPaintCanvasMouseDown(event);
  1747 + $rootScope.clicked = true;
  1748 + // OnPaintCanvasMouseDown(event);
1685 1749  
1686   - var annotationCanvas = document.getElementById('canvas');
1687   - if (annotationCanvas != null || annotationCanvas != undefined) {
1688   - annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintCanvasMouseDown, false);
1689   - annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false);
1690   - }
1691   - // alert("doclick");
1692   - };
  1750 + var annotationCanvas = document.getElementById('canvas');
  1751 + if (annotationCanvas != null || annotationCanvas != undefined) {
  1752 + annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintCanvasMouseDown, false);
  1753 + annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false);
  1754 + }
  1755 + // alert("doclick");
  1756 + };
1693 1757  
1694 1758  
1695 1759 $(document).keydown(function (event) {
... ... @@ -1729,7 +1793,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1729 1793 $rootScope.closeModal = function () {
1730 1794  
1731 1795 document.getElementById('modelbackground').style.display = "none";
1732   -
  1796 +
1733 1797 //if ($rootScope.isTextAreaClosedButtonActive == true) {
1734 1798 // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers();
1735 1799 // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
... ... @@ -1817,43 +1881,53 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1817 1881 }
1818 1882  
1819 1883 $rootScope.disableAnnotationTB = false;
1820   - $rootScope.disableAnnotationTBFn = function()
1821   - {
  1884 + $rootScope.disableAnnotationTBFn = function () {
1822 1885 $rootScope.disableAnnotationTB = true;
1823 1886 }
1824 1887  
1825 1888 //list manager function
1826 1889  
1827 1890 //list manager function
1828   -
  1891 +
1829 1892 $rootScope.disableAnnotationtoolOnListManager = false;
1830 1893 $rootScope.ShowListManager = function () {
1831 1894 console.log('ShowListManager')
1832   -
1833 1895 $rootScope.disableAnnotationtoolOnListManager = true;
1834   -
  1896 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  1897 + $('#slider-range-min-2').slider('disable');
1835 1898 $rootScope.isLoading = true;
1836 1899 $('#spinner').css('visibility', 'visible');
1837 1900  
1838 1901 $('#listManager').css('display', 'block');
1839 1902 $("#listManager").css("visibility", "visible");
  1903 +
  1904 + // $('#termList option[selected="selected"]').prop("selected", false);
  1905 + // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").prop("selected", true);
  1906 + // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  1907 + // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
1840 1908 $('#listManager').draggable();
1841 1909  
1842 1910  
1843 1911 $rootScope.islistManagerEventAlredayDispachted = true;
1844 1912  
1845 1913 $rootScope.$broadcast('listManagerEvent', true);
  1914 +
  1915 + $('#termList option[selected="selected"]').prop("selected", false);
  1916 + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
  1917 + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  1918 + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
1846 1919 }
1847 1920  
1848 1921 $rootScope.CloseListManager = function () {
1849 1922 console.log('close')
1850   -
1851 1923 $rootScope.disableAnnotationtoolOnListManager = false;
1852   - if ($rootScope.disableAnnotationtoolOnListManager == false) {
1853   - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
1854   - $('#slider-range-min-2').slider('enable');
  1924 + if ($rootScope.MenuModuleName == "DA") {
  1925 +
  1926 + if ($rootScope.disableAnnotationtoolOnListManager == false) {
  1927 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
  1928 + $('#slider-range-min-2').slider('enable');
  1929 + }
1855 1930 }
1856   - //$rootScope.isListManagerSelected = false;
1857 1931 $('#listManager').css('display', 'none');
1858 1932 $("#listManager").css("visibility", "hidden");
1859 1933  
... ... @@ -2022,8 +2096,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
2022 2096 if (len > 0) {
2023 2097 $rootScope.reloadChildController();
2024 2098 }
2025   - else
2026   - {
  2099 + else {
2027 2100 $('#modal-settings').modal('hide');
2028 2101 }
2029 2102  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
1   -๏ปฟ<div class="bodyWrap row ">
  1 +๏ปฟ
  2 +<div class="bodyWrap row ">
2 3 <div ng-include="'app/widget/MainMenu.html'" />
3 4 <div class="main">
4 5  
... ... @@ -11,7 +12,7 @@
11 12 <div class="col-md-2 col-sm-4 pad-lftrgt3">
12 13 <div class="form-group">
13 14 <h6 class="text-center text-primary txt-white f11">Body Region</h6>
14   - <select class="form-control input-sm" ng-model="query.selectedbodyregion" ng-options="item for item in CAAllBodyRegion track by item">
  15 + <select class="form-control input-sm" ng-change="hideListViewDiv()" ng-model="query.selectedbodyregion" ng-options="item for item in CAAllBodyRegion track by item">
15 16 <option value="">All</option>
16 17 </select>
17 18 </div>
... ... @@ -19,7 +20,7 @@
19 20 <div class="col-md-2 col-sm-4 pad-lftrgt3">
20 21 <div class="form-group">
21 22 <h6 class="text-center text-primary txt-white f11">Body System</h6>
22   - <select class="form-control input-sm" ng-model="query.selectedbodysystem" ng-options="item for item in CAAllBodySystem track by item">
  23 + <select class="form-control input-sm" ng-change="hideListViewDiv()" ng-model="query.selectedbodysystem" ng-options="item for item in CAAllBodySystem track by item">
23 24 <option value="">All</option>
24 25 </select>
25 26 </div>
... ... @@ -27,7 +28,7 @@
27 28 <div class="col-md-2 col-sm-4 pad-lftrgt3">
28 29 <div class="form-group">
29 30 <h6 class="text-center text-primary txt-white f11">Medical Speciality</h6>
30   - <select class="form-control input-sm" ng-model="query.selectedspecialty" ng-options="item for item in CAAllSpeciality track by item">
  31 + <select class="form-control input-sm" ng-change="hideListViewDiv()" ng-model="query.selectedspecialty" ng-options="item for item in CAAllSpeciality track by item">
31 32 <option value="">All</option>
32 33 </select>
33 34 </div>
... ... @@ -67,8 +68,8 @@
67 68 <th style="min-width: 280px;">Specialty</th>
68 69 </tr>
69 70 </thead>
70   - <tbody ng-if="!filterstring" class="clstbodyca">
71   - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData">
  71 + <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbodyca">
  72 + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData">
72 73 <td style="max-width: 250px;">
73 74 {{item._Title}}
74 75 </td>
... ... @@ -83,8 +84,8 @@
83 84 </td>
84 85 </tr>
85 86 </tbody>
86   - <tbody ng-if="filterstring" class="clstbodyca">
87   - <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData">
  87 + <tbody id="ListViewDiv" ng-if="filterstring" class="clstbodyca">
  88 + <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData">
88 89 <td style="max-width: 250px;">
89 90 {{item._Title}}
90 91 </td>
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
1   -๏ปฟ<div class="bodyWrap row no-scroll">
  1 +๏ปฟ
  2 +<div class="bodyWrap row no-scroll">
2 3 <div ng-include=" 'app/widget/MainMenu.html' " />
3 4 <div class="main">
4 5 <div class="col-sm-12 stickey-area clsstickydiv">
... ... @@ -8,7 +9,7 @@
8 9 <div class="col-md-2 col-sm-4 pad-lftrgt3">
9 10 <div class="form-group">
10 11 <h6 class="text-center text-primary txt-white f11">Body Region</h6>
11   - <select class="form-control input-sm" ng-model="query.selectedbodyregion" ng-options="item for item in CIAllBodyRegion track by item">
  12 + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedbodyregion" ng-options="item for item in CIAllBodyRegion track by item">
12 13 <option value="">All</option>
13 14 </select>
14 15 </div>
... ... @@ -16,7 +17,7 @@
16 17 <div class="col-md-2 col-sm-4 pad-lftrgt3">
17 18 <div class="form-group">
18 19 <h6 class="text-center text-primary txt-white f11">Body System</h6>
19   - <select class="form-control input-sm" ng-model="query.selectedbodysystem" ng-options="item for item in CIAllBodySystem track by item">
  20 + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedbodysystem" ng-options="item for item in CIAllBodySystem track by item">
20 21 <option value="">All</option>
21 22 </select>
22 23 </div>
... ... @@ -25,7 +26,7 @@
25 26 <div class="col-md-2 col-sm-4 pad-lftrgt3">
26 27 <div class="form-group">
27 28 <h6 class="text-center text-primary txt-white f11">View Orientation</h6>
28   - <select class="form-control input-sm" ng-model="query.selectedorientation" ng-options="item for item in CIAllOrientation track by item">
  29 + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedorientation" ng-options="item for item in CIAllOrientation track by item">
29 30 <option value="">All</option>
30 31 </select>
31 32 </div>
... ... @@ -33,7 +34,7 @@
33 34 <div class="col-md-2 col-sm-4 pad-lftrgt3">
34 35 <div class="form-group">
35 36 <h6 class="text-center text-primary txt-white f11">Image Type</h6>
36   - <select class="form-control input-sm" ng-model="query.selectedimagetype" ng-options="item for item in CIAllImageType track by item">
  37 + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedimagetype" ng-options="item for item in CIAllImageType track by item">
37 38 <option value="">All</option>
38 39 </select>
39 40 </div>
... ... @@ -41,7 +42,7 @@
41 42 <div class="col-md-2 col-sm-4 pad-lftrgt3">
42 43 <div class="form-group">
43 44 <h6 class="text-center text-primary txt-white f11">Medical Speciality</h6>
44   - <select class="form-control input-sm" ng-model="query.selectedspecialty" ng-options="item for item in CIAllSpeciality track by item">
  45 + <select ng-change="hideListViewDiv()"class="form-control input-sm" ng-model="query.selectedspecialty" ng-options="item for item in CIAllSpeciality track by item">
45 46 <option value="">All</option>
46 47 </select>
47 48 </div>
... ... @@ -111,8 +112,8 @@
111 112 <th width="25%">Specialty</th>
112 113 </tr>
113 114 </thead>
114   - <tbody ng-if="!filterstring" class="clstbody">
115   - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData">
  115 + <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">
  116 + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData">
116 117 <td width="15%">
117 118 {{item._Title}}
118 119 </td>
... ... @@ -133,8 +134,8 @@
133 134 </td>
134 135 </tr>
135 136 </tbody>
136   - <tbody ng-if="filterstring" class="clstbody">
137   - <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData">
  137 + <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">
  138 + <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData">
138 139 <td width="15%">
139 140 {{item._Title}}
140 141 </td>
... ... @@ -160,7 +161,7 @@
160 161 </tbody>
161 162 </table>
162 163 </div>
163   - <div class="col-sm-12" ng-show=" hiderow" style="padding-left:25px;padding-top:10px;">
  164 + <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;">
164 165 <div class="row well">
165 166 <div title="{{SelectedCITitle}}" class="col-sm-3 col-lg-2 no-padding">
166 167 <div class="thumbnail no-margin">
... ... @@ -181,3 +182,4 @@
181 182 </div>
182 183 </div>
183 184  
  185 +
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -55,14 +55,6 @@
55 55 display: none;
56 56 }
57 57  
58   - .customTooltip {
59   - background: #333 !important;
60   - color: #fff !important;
61   - /*opacity: 0.9 !important;*/
62   - }
63   -
64   -
65   -
66 58  
67 59 .custom-tooltip {
68 60 background-color: #333;
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
... ... @@ -14,8 +14,8 @@
14 14 <!--<li role="presentation" class="active" title="Image View"><i class=" fa fa-image txt-white cur-pot" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li>
15 15 <li role="presentation" title="List View"><i class="fa fa-list-alt txt-white cur-pot" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li>-->
16 16  
17   - <li role="presentation" ng-class="{'active':activeTab==1}" title="Image View"><i class=" fa fa-image txt-white cur-pot" ng-click="setActiveTab(1)" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li>
18   - <li role="presentation" ng-class="{'active':activeTab==2}" title="List View"><i class="fa fa-list-alt txt-white cur-pot" ng-click="setActiveTab(2)" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li>
  17 + <li role="presentation" class="tooltip-custom" ng-class="{'active':activeTab==1}" title="Image View"><i class=" fa fa-image txt-white cur-pot" ng-click="setActiveTab(1)" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li>
  18 + <li role="presentation" class="tooltip-custom" ng-class="{'active':activeTab==2}" title="List View"><i class="fa fa-list-alt txt-white cur-pot" ng-click="setActiveTab(2)" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li>
19 19  
20 20 </ul>
21 21 </div>
... ... @@ -206,3 +206,8 @@
206 206 });
207 207 });
208 208 </script>
  209 +<script>
  210 + $(".tooltip-custom").tooltip({
  211 + tooltipClass: 'customTooltip'
  212 + });
  213 +</script>
... ...
400-SOURCECODE/AIAHTML5.Web/content/data/json/ci/ci_dat_contentlist.json
... ... @@ -298,7 +298,7 @@
298 298 "_ViewOrientation":"Non-standard",
299 299 "_MedicalSpecialty":"Radiology",
300 300 "_ImageType":"Illustration",
301   - "_Summary":"Abdominal ultrasound is a scanning technique used to image the interior of the abdomen. Like the x-ray, MRI, and CT scan, CIData has its place as a diagnostic tool. Ultrasound scans use high frequency sound waves to produce an image and do not expose the individual to radiation. The procedure is painless and safe."
  301 + "_Summary":"Abdominal ultrasound is a scanning technique used to image the interior of the abdomen. Like the x-ray, MRI, and CT scan, it has its place as a diagnostic tool. Ultrasound scans use high frequency sound waves to produce an image and do not expose the individual to radiation. The procedure is painless and safe."
302 302 },
303 303 {
304 304 "_id":"538",
... ... @@ -584,7 +584,7 @@
584 584 "_ViewOrientation":"Anterior, Non-standard",
585 585 "_MedicalSpecialty":"Neurology, Opthalmology, Optometry, Physiology",
586 586 "_ImageType":"Illustration",
587   - "_Summary":"The eye is the organ of sight, a nearly spherical hollow globe filled with fluids (humors). The outer layer or tunic (sclera, or white, and cornea) is fibrous and protective. The middle tunic layer (choroid, ciliary body and the iris) is vascular. The innermost layer (the retina) is nervous or sensory. The fluids in the eye are divided by the lens into the vitreous humor (behind the lens) and the aqueous humor (in front of the lens). The lens itself is flexible and suspended by ligaments which allow CIData to change shape to focus light on the retina, which is composed of sensory neurons."
  587 + "_Summary":"The eye is the organ of sight, a nearly spherical hollow globe filled with fluids (humors). The outer layer or tunic (sclera, or white, and cornea) is fibrous and protective. The middle tunic layer (choroid, ciliary body and the iris) is vascular. The innermost layer (the retina) is nervous or sensory. The fluids in the eye are divided by the lens into the vitreous humor (behind the lens) and the aqueous humor (in front of the lens). The lens itself is flexible and suspended by ligaments which allow it to change shape to focus light on the retina, which is composed of sensory neurons."
588 588 },
589 589 {
590 590 "_id":"562",
... ... @@ -1260,7 +1260,7 @@
1260 1260 "_ViewOrientation":"Anterior",
1261 1261 "_MedicalSpecialty":"Cardiology, Emergency Medicine, Vascular Medicine",
1262 1262 "_ImageType":"Illustration",
1263   - "_Summary":"Venous thrombosis formed in the leg may break free and travel to the heart and lungs, where CIData can become lodged and block the flow of blood in these vital organs. A blood clot that forms in a vessel or within the heart and remains there is called a thrombus. A thrombus that travels from the vessel or heart chamber where CIData formed to another location in the body is called an embolus, and the disorder, an embolism. For example, a deep venous thrombosis (DVT) that travels to and blocks blood flow in the lung is called a pulmonary embolism."
  1263 + "_Summary":"Venous thrombosis formed in the leg may break free and travel to the heart and lungs, where it can become lodged and block the flow of blood in these vital organs. A blood clot that forms in a vessel or within the heart and remains there is called a thrombus. A thrombus that travels from the vessel or heart chamber where it formed to another location in the body is called an embolus, and the disorder, an embolism. For example, a deep venous thrombosis (DVT) that travels to and blocks blood flow in the lung is called a pulmonary embolism."
1264 1264 },
1265 1265 {
1266 1266 "_id":"613",
... ... @@ -1299,7 +1299,7 @@
1299 1299 "_ViewOrientation":"Medial",
1300 1300 "_MedicalSpecialty":"Obstetrics and Gynecology (OB/GYN)",
1301 1301 "_ImageType":"Illustration",
1302   - "_Summary":"Amniotic fluid not only protects the fetus from injury and temperature changes, CIData also is circulated by the fetus every 3 hours."
  1302 + "_Summary":"Amniotic fluid not only protects the fetus from injury and temperature changes, it also is circulated by the fetus every 3 hours."
1303 1303 },
1304 1304 {
1305 1305 "_id":"616",
... ... @@ -1663,7 +1663,7 @@
1663 1663 "_ViewOrientation":"Anterior",
1664 1664 "_MedicalSpecialty":"Obstetrics and Gynecology (OB/GYN), Physiology",
1665 1665 "_ImageType":"Illustration",
1666   - "_Summary":"Abnormal menstrual periods may have a variety of causes, such as endometrial hyperplasia, endometrial polyps, uterine fibroids, and abnormal thyroid or pituitary function.The endometrium is the tissue lining the uterus. When the endometrium becomes unusually thick CIData is called endometrial hyperplasia. Hyperplasia may cause profuse or extended menstrual bleeding."
  1666 + "_Summary":"Abnormal menstrual periods may have a variety of causes, such as endometrial hyperplasia, endometrial polyps, uterine fibroids, and abnormal thyroid or pituitary function.The endometrium is the tissue lining the uterus. When the endometrium becomes unusually thick it is called endometrial hyperplasia. Hyperplasia may cause profuse or extended menstrual bleeding."
1667 1667 },
1668 1668 {
1669 1669 "_id":"641",
... ... @@ -1702,7 +1702,7 @@
1702 1702 "_ViewOrientation":"Non-standard",
1703 1703 "_MedicalSpecialty":"Pulmonary Medicine",
1704 1704 "_ImageType":"Illustration",
1705   - "_Summary":"Bronchitis is the inflammation of the bronchi, the main air passages to the lungs, CIData generally follows a viral respiratory infection. Symptoms include; coughing, shortness of breath, wheezing and fatigue."
  1705 + "_Summary":"Bronchitis is the inflammation of the bronchi, the main air passages to the lungs, it generally follows a viral respiratory infection. Symptoms include; coughing, shortness of breath, wheezing and fatigue."
1706 1706 },
1707 1707 {
1708 1708 "_id":"645",
... ... @@ -1728,7 +1728,7 @@
1728 1728 "_ViewOrientation":"Medial",
1729 1729 "_MedicalSpecialty":"Allergy & Immunology, Hematology, Infectious Diseases, Oncology (Cancer), Pathology",
1730 1730 "_ImageType":"Illustration",
1731   - "_Summary":"Ovarian cancer is particularly dangerous because its presence is difficult to detect until CIData has spread beyond the ovaries."
  1731 + "_Summary":"Ovarian cancer is particularly dangerous because its presence is difficult to detect until it has spread beyond the ovaries."
1732 1732 },
1733 1733 {
1734 1734 "_id":"647",
... ... @@ -1754,7 +1754,7 @@
1754 1754 "_ViewOrientation":"Anterior",
1755 1755 "_MedicalSpecialty":"Gastroenterology, Pathology",
1756 1756 "_ImageType":"Illustration",
1757   - "_Summary":"Cytomegalovirus is a large herpes-type virus commonly found in humans that can cause serious infections in people with impaired immunity. CMV esophagitis, which may lead to ulcers, is treated with antiviral medications, which may stop the replication of the virus but will not destroy CIData."
  1757 + "_Summary":"Cytomegalovirus is a large herpes-type virus commonly found in humans that can cause serious infections in people with impaired immunity. CMV esophagitis, which may lead to ulcers, is treated with antiviral medications, which may stop the replication of the virus but will not destroy it."
1758 1758 },
1759 1759 {
1760 1760 "_id":"649",
... ... @@ -1858,7 +1858,7 @@
1858 1858 "_ViewOrientation":"Posterior",
1859 1859 "_MedicalSpecialty":"Orthopedics, Pathology, Rheumatology",
1860 1860 "_ImageType":"Illustration",
1861   - "_Summary":"The affect of rheumatoid arthritis can progress to the degree that CIData is crippling. Deformities distinctive to late-stage rheumatoid arthritis such as ulnar deviation of the bones of the hands, or swan-neck deviation of the fingers occur because muscles and tendons on one side of the joint may overpower those on the other side, pulling the bones out of alignment."
  1861 + "_Summary":"The affect of rheumatoid arthritis can progress to the degree that it is crippling. Deformities distinctive to late-stage rheumatoid arthritis such as ulnar deviation of the bones of the hands, or swan-neck deviation of the fingers occur because muscles and tendons on one side of the joint may overpower those on the other side, pulling the bones out of alignment."
1862 1862 },
1863 1863 {
1864 1864 "_id":"658",
... ... @@ -2248,7 +2248,7 @@
2248 2248 "_ViewOrientation":"Anterior",
2249 2249 "_MedicalSpecialty":"Neurology, Opthalmology, Optometry, Physiology",
2250 2250 "_ImageType":"Illustration",
2251   - "_Summary":"The lens of an eye is normally clear. If the lens becomes cloudy or is opacified CIData is called a cataract."
  2251 + "_Summary":"The lens of an eye is normally clear. If the lens becomes cloudy or is opacified it is called a cataract."
2252 2252 },
2253 2253 {
2254 2254 "_id":"690",
... ... @@ -2612,7 +2612,7 @@
2612 2612 "_ViewOrientation":"Medial",
2613 2613 "_MedicalSpecialty":"Pathology, Vascular Medicine",
2614 2614 "_ImageType":"Illustration",
2615   - "_Summary":"Aortic dissection is a condition in which there is bleeding into and along the wall of the aorta (the major artery from the heart). This most often occurs because of a tear or damage to the inner wall of the artery. Although aortic dissection can affect anybody, CIData is most often seen in men 40 to 70 years old. Symptoms usually begin suddenly and require prompt medical attention."
  2615 + "_Summary":"Aortic dissection is a condition in which there is bleeding into and along the wall of the aorta (the major artery from the heart). This most often occurs because of a tear or damage to the inner wall of the artery. Although aortic dissection can affect anybody, it is most often seen in men 40 to 70 years old. Symptoms usually begin suddenly and require prompt medical attention."
2616 2616 },
2617 2617 {
2618 2618 "_id":"719",
... ... @@ -2690,7 +2690,7 @@
2690 2690 "_ViewOrientation":"Superior",
2691 2691 "_MedicalSpecialty":"Cardiology, Pathology",
2692 2692 "_ImageType":"Illustration",
2693   - "_Summary":"Mitral stenosis is a heart valve disorder that narrows or obstructs the mitral valve opening. Narrowing of the mitral valve prevents the valve from opening properly and obstructs the blood flow from the left atrium to the left ventricle. This can reduce the amount of blood that flows forward to the body. The main risk factor for mitral stenosis is a history of rheumatic fever but CIData may also be triggered by pregnancy or other stress on the body such as a respiratory infection, endocarditis, and other cardiac disorders."
  2693 + "_Summary":"Mitral stenosis is a heart valve disorder that narrows or obstructs the mitral valve opening. Narrowing of the mitral valve prevents the valve from opening properly and obstructs the blood flow from the left atrium to the left ventricle. This can reduce the amount of blood that flows forward to the body. The main risk factor for mitral stenosis is a history of rheumatic fever but it may also be triggered by pregnancy or other stress on the body such as a respiratory infection, endocarditis, and other cardiac disorders."
2694 2694 },
2695 2695 {
2696 2696 "_id":"755",
... ... @@ -2703,7 +2703,7 @@
2703 2703 "_ViewOrientation":"Anterior",
2704 2704 "_MedicalSpecialty":"Cardiology, Pathology",
2705 2705 "_ImageType":"Illustration",
2706   - "_Summary":"Mitral valve prolapse is a disorder in which, during the contraction phase of the heart, the mitral valve does not close properly. When the valve does not close properly CIData allows blood to backflow into the left atrium. Some symptoms can include palpitations, chest pain, difficulty breathing after exertion, fatigue, cough, and shortness of breath while lying down."
  2706 + "_Summary":"Mitral valve prolapse is a disorder in which, during the contraction phase of the heart, the mitral valve does not close properly. When the valve does not close properly it allows blood to backflow into the left atrium. Some symptoms can include palpitations, chest pain, difficulty breathing after exertion, fatigue, cough, and shortness of breath while lying down."
2707 2707 },
2708 2708 {
2709 2709 "_id":"756",
... ... @@ -2742,7 +2742,7 @@
2742 2742 "_ViewOrientation":"Medial",
2743 2743 "_MedicalSpecialty":"Pathology, Vascular Medicine",
2744 2744 "_ImageType":"Illustration",
2745   - "_Summary":"An embolism is a clot that travels from the site where CIData formed to another location in the body. The embolism can lodge in an artery at the new location and block the flow of blood there. The blockage deprives the tissues in that location of its normal blood flow and oxygen. This can result in damage, destruction, or even death of the tissues (necrosis) in that organ. Arterial embolism requires prompt treatment, usually with hospitalization."
  2745 + "_Summary":"An embolism is a clot that travels from the site where it formed to another location in the body. The embolism can lodge in an artery at the new location and block the flow of blood there. The blockage deprives the tissues in that location of its normal blood flow and oxygen. This can result in damage, destruction, or even death of the tissues (necrosis) in that organ. Arterial embolism requires prompt treatment, usually with hospitalization."
2746 2746 },
2747 2747 {
2748 2748 "_id":"722",
... ... @@ -2963,7 +2963,7 @@
2963 2963 "_ViewOrientation":"Anterior",
2964 2964 "_MedicalSpecialty":"Pathology, Vascular Medicine",
2965 2965 "_ImageType":"Illustration",
2966   - "_Summary":"A thrombus is a blood clot that forms in a vessel and remains there. An embolism is a clot that travels from the site where CIData formed to another location in the body. Thrombi or emboli can lodge in a blood vessel and block the flow of blood in that location depriving tissues of normal blood flow and oxygen. This can result in damage, destruction (infarction), or even death of the tissues (necrosis) in that area."
  2966 + "_Summary":"A thrombus is a blood clot that forms in a vessel and remains there. An embolism is a clot that travels from the site where it formed to another location in the body. Thrombi or emboli can lodge in a blood vessel and block the flow of blood in that location depriving tissues of normal blood flow and oxygen. This can result in damage, destruction (infarction), or even death of the tissues (necrosis) in that area."
2967 2967 },
2968 2968 {
2969 2969 "_id":"739",
... ... @@ -3119,7 +3119,7 @@
3119 3119 "_ViewOrientation":"Anterior",
3120 3120 "_MedicalSpecialty":"Cardiology, Pathology",
3121 3121 "_ImageType":"Illustration",
3122   - "_Summary":"Endocarditis is an infection and inflammation of the valves in the heart. When the infection cannot be cultured and linked to any causative organism from the bloodstream, CIData is referred to as culture-negative endocarditis."
  3122 + "_Summary":"Endocarditis is an infection and inflammation of the valves in the heart. When the infection cannot be cultured and linked to any causative organism from the bloodstream, it is referred to as culture-negative endocarditis."
3123 3123 },
3124 3124 {
3125 3125 "_id":"748",
... ... @@ -3301,7 +3301,7 @@
3301 3301 "_ViewOrientation":"Superior",
3302 3302 "_MedicalSpecialty":"Cardiology, Pathology",
3303 3303 "_ImageType":"Illustration",
3304   - "_Summary":"Valves may be repaired or replaced. Replacement heart valves are either natural (biologic) or artificial (mechanical). Natural valves are from human donors (cadavers), modified natural valves are from animal donors (porcine: pigs) which are placed in synthetic rings, and artificial valves are made of metal or plastic. Natural valves rarely require life-long medication to prevent blood clot formation (anticoagulation), whereas artificial valves will require anticoagulation. The advantage of mechanical valves is that they last longer-thus, the tradeoff of lifelong anticoagulation in some cases is worth CIData to avoid a second valve replacement surgery."
  3304 + "_Summary":"Valves may be repaired or replaced. Replacement heart valves are either natural (biologic) or artificial (mechanical). Natural valves are from human donors (cadavers), modified natural valves are from animal donors (porcine: pigs) which are placed in synthetic rings, and artificial valves are made of metal or plastic. Natural valves rarely require life-long medication to prevent blood clot formation (anticoagulation), whereas artificial valves will require anticoagulation. The advantage of mechanical valves is that they last longer-thus, the tradeoff of lifelong anticoagulation in some cases is worth it to avoid a second valve replacement surgery."
3305 3305 },
3306 3306 {
3307 3307 "_id":"768",
... ... @@ -3327,7 +3327,7 @@
3327 3327 "_ViewOrientation":"Posterior",
3328 3328 "_MedicalSpecialty":"Dermatology, Infectious Diseases, Microbiology, Pathology",
3329 3329 "_ImageType":"Illustration",
3330   - "_Summary":"Cutaneous anthrax is an infection of the skin caused by the bacterium Bacillus anthracis. The bacteria causes disease when CIData comes into contact with non-intact skin. During an infection, an initial skin lesion forms then blisters. The blister breaks down into a black ulcer and nearby lymph nodes may become infected and painful. A scar is often formed which then dries and falls off within two weeks. In 20% of untreated individuals, the infection may spread to the bloodstream and become fatal. Although with proper treatment, death is extremely rare."
  3330 + "_Summary":"Cutaneous anthrax is an infection of the skin caused by the bacterium Bacillus anthracis. The bacteria causes disease when it comes into contact with non-intact skin. During an infection, an initial skin lesion forms then blisters. The blister breaks down into a black ulcer and nearby lymph nodes may become infected and painful. A scar is often formed which then dries and falls off within two weeks. In 20% of untreated individuals, the infection may spread to the bloodstream and become fatal. Although with proper treatment, death is extremely rare."
3331 3331 },
3332 3332 {
3333 3333 "_id":"770",
... ... @@ -3353,7 +3353,7 @@
3353 3353 "_ViewOrientation":"Medial",
3354 3354 "_MedicalSpecialty":"Urology",
3355 3355 "_ImageType":"Illustration",
3356   - "_Summary":"The testes are where sperm are manufactured in the scrotum. The epididymis is a tortuously coiled structure topping the testis, and CIData receives immature sperm from the testis and stores CIData several days. When ejaculation occurs, sperm is forcefully expelled from the tail of the epididymis into the deferent duct. Sperm then travels through the deferent duct through up the spermatic cord into the pelvic cavity, over the ureter to the prostate behind the bladder. Here, the vas deferens joins with the seminal vesicle to form the ejaculatory duct, which passes through the prostate and empties into the urethra. When ejaculation occurs, rhythmic muscle movements propel the sperm forward."
  3356 + "_Summary":"The testes are where sperm are manufactured in the scrotum. The epididymis is a tortuously coiled structure topping the testis, and it receives immature sperm from the testis and stores it several days. When ejaculation occurs, sperm is forcefully expelled from the tail of the epididymis into the deferent duct. Sperm then travels through the deferent duct through up the spermatic cord into the pelvic cavity, over the ureter to the prostate behind the bladder. Here, the vas deferens joins with the seminal vesicle to form the ejaculatory duct, which passes through the prostate and empties into the urethra. When ejaculation occurs, rhythmic muscle movements propel the sperm forward."
3357 3357 },
3358 3358 {
3359 3359 "_id":"772",
... ... @@ -3392,7 +3392,7 @@
3392 3392 "_ViewOrientation":"Anterior",
3393 3393 "_MedicalSpecialty":"Dermatology, Emergency Medicine, First Aid, Plastic Surgery",
3394 3394 "_ImageType":"Illustration",
3395   - "_Summary":"A skin graft is a surgical procedure in which a piece of skin is transplanted from one area to another. Often skin will be taken from unaffected areas on the injured person and used to cover a defect, often a burn. If the area of the skin defect is especially large, the harvested skin may be meshed to stretch CIData into a larger patch. If the defect involves a great loss of tissue, a full thickness graft, a flap of skin with underlying muscle and blood vessles, may be required. Taking the graft from the injured person makes rejection of the tissue unlikely."
  3395 + "_Summary":"A skin graft is a surgical procedure in which a piece of skin is transplanted from one area to another. Often skin will be taken from unaffected areas on the injured person and used to cover a defect, often a burn. If the area of the skin defect is especially large, the harvested skin may be meshed to stretch it into a larger patch. If the defect involves a great loss of tissue, a full thickness graft, a flap of skin with underlying muscle and blood vessles, may be required. Taking the graft from the injured person makes rejection of the tissue unlikely."
3396 3396 },
3397 3397 {
3398 3398 "_id":"775",
... ... @@ -3470,7 +3470,7 @@
3470 3470 "_ViewOrientation":"Posterior",
3471 3471 "_MedicalSpecialty":"Dermatology, Plastic Surgery",
3472 3472 "_ImageType":"Illustration",
3473   - "_Summary":"A special liposuction machine and instruments are used. While the patient is pain-free (local anesthesia or general anesthesia), small suction instruments are inserted through the skin into the fat pockets. The suction instruments are moved around to break up the fat and suction CIData out. Several punctures may be necessary to treat large areas. Small tubes may be placed to help drain out fluids and blood during the first few days. Liposuction may not require hospitalization, depending on the location and amount of surgery."
  3473 + "_Summary":"A special liposuction machine and instruments are used. While the patient is pain-free (local anesthesia or general anesthesia), small suction instruments are inserted through the skin into the fat pockets. The suction instruments are moved around to break up the fat and suction it out. Several punctures may be necessary to treat large areas. Small tubes may be placed to help drain out fluids and blood during the first few days. Liposuction may not require hospitalization, depending on the location and amount of surgery."
3474 3474 },
3475 3475 {
3476 3476 "_id":"785",
... ... @@ -3769,7 +3769,7 @@
3769 3769 "_ViewOrientation":"Anterior",
3770 3770 "_MedicalSpecialty":"Gastroenterology, Oncology (Cancer), Pathology",
3771 3771 "_ImageType":"Illustration",
3772   - "_Summary":"The staging of a carcinoma has to do with the size of the tumor, and the degree to which CIData has penetrated. When the tumor is small and has not penetrated the mucosal layer, CIData is said to be stage I cancer. Stage II tumors are into the muscle wall, and stage III involves nearby lymph nodes. The rare stage IV cancer has spread (metastasized) to remote organs."
  3772 + "_Summary":"The staging of a carcinoma has to do with the size of the tumor, and the degree to which it has penetrated. When the tumor is small and has not penetrated the mucosal layer, it is said to be stage I cancer. Stage II tumors are into the muscle wall, and stage III involves nearby lymph nodes. The rare stage IV cancer has spread (metastasized) to remote organs."
3773 3773 },
3774 3774 {
3775 3775 "_id":"800",
... ... @@ -3938,7 +3938,7 @@
3938 3938 "_ViewOrientation":"Anterior",
3939 3939 "_MedicalSpecialty":"Gastroenterology, General Surgery",
3940 3940 "_ImageType":"Illustration",
3941   - "_Summary":"The Roux-en-Y gastric bypass procedure involves creating a stomach pouch out of a small portion of the stomach and attaching CIData directly to the small intestine, bypassing a large part of the stomach and duodenum. Not only is the stomach pouch too small to hold large amounts of food, but by skipping the duodenum, fat absorption is substantially reduced."
  3941 + "_Summary":"The Roux-en-Y gastric bypass procedure involves creating a stomach pouch out of a small portion of the stomach and attaching it directly to the small intestine, bypassing a large part of the stomach and duodenum. Not only is the stomach pouch too small to hold large amounts of food, but by skipping the duodenum, fat absorption is substantially reduced."
3942 3942 },
3943 3943 {
3944 3944 "_id":"814",
... ... @@ -3951,7 +3951,7 @@
3951 3951 "_ViewOrientation":"Non-standard",
3952 3952 "_MedicalSpecialty":"Hematology, Physiology",
3953 3953 "_ImageType":"Illustration",
3954   - "_Summary":"Cholesterol does not mix well with blood. To help cholesterol travel through blood to get where CIData is needed, the body wraps CIData within water-soluble proteins. This mixture of fatty cholesterol and protein is known as a \"lipoprotein.\""
  3954 + "_Summary":"Cholesterol does not mix well with blood. To help cholesterol travel through blood to get where it is needed, the body wraps it within water-soluble proteins. This mixture of fatty cholesterol and protein is known as a \"lipoprotein.\""
3955 3955 },
3956 3956 {
3957 3957 "_id":"817",
... ... @@ -4003,7 +4003,7 @@
4003 4003 "_ViewOrientation":"Anterior",
4004 4004 "_MedicalSpecialty":"Gastroenterology, Pathology",
4005 4005 "_ImageType":"Illustration",
4006   - "_Summary":"Crohn's disease is an inflammation of the intestines caused by immune response to an infection. The lining of the intestine may ulcerate and form channels of infection, called fistulas. Fistulas tunnel from the area of ulceration, creating a hole which may continue until CIData reaches the surface of the organ, or the surface of nearby skin. These holes typically spread the infection that creates them, and life-threatening conditions such as peritonitis (inflammation of the lining of the abdomen) may occur."
  4006 + "_Summary":"Crohn's disease is an inflammation of the intestines caused by immune response to an infection. The lining of the intestine may ulcerate and form channels of infection, called fistulas. Fistulas tunnel from the area of ulceration, creating a hole which may continue until it reaches the surface of the organ, or the surface of nearby skin. These holes typically spread the infection that creates them, and life-threatening conditions such as peritonitis (inflammation of the lining of the abdomen) may occur."
4007 4007 },
4008 4008 {
4009 4009 "_id":"822",
... ... @@ -4016,7 +4016,7 @@
4016 4016 "_ViewOrientation":"Anterior",
4017 4017 "_MedicalSpecialty":"Allergy & Immunology, Hematology, Infectious Diseases, Oncology (Cancer), Pathology",
4018 4018 "_ImageType":"Illustration",
4019   - "_Summary":"Sentinel node biopsy is a technique which helps determine if a cancer has spread (metastisized), or is contained locally. When a cancer has been detected, often the next step is to find the lymph node closest to the tumor site and retrieve CIData for analysis. The concept of the \"sentinel\" node, or the first node to drain the area of the cancer, allows a more accurate staging of the cancer, and leaves unaffected nodes behind to continue the important job of draining fluids. The procedure involves the injection of a dye (sometimes mildly radioactive) to pinpoint the lymph node which is closest to the cancer site. Sentinel node biopsy is used to stage many kinds of cancer, including lung and skin (melanoma)."
  4019 + "_Summary":"Sentinel node biopsy is a technique which helps determine if a cancer has spread (metastisized), or is contained locally. When a cancer has been detected, often the next step is to find the lymph node closest to the tumor site and retrieve it for analysis. The concept of the \"sentinel\" node, or the first node to drain the area of the cancer, allows a more accurate staging of the cancer, and leaves unaffected nodes behind to continue the important job of draining fluids. The procedure involves the injection of a dye (sometimes mildly radioactive) to pinpoint the lymph node which is closest to the cancer site. Sentinel node biopsy is used to stage many kinds of cancer, including lung and skin (melanoma)."
4020 4020 },
4021 4021 {
4022 4022 "_id":"823",
... ... @@ -4042,7 +4042,7 @@
4042 4042 "_ViewOrientation":"Medial",
4043 4043 "_MedicalSpecialty":"Allergy & Immunology, Hematology, Infectious Diseases, Oncology (Cancer), Physiology",
4044 4044 "_ImageType":"Illustration",
4045   - "_Summary":"Lymph nodes function as part of the immune system to protect against and fight infection, inflammation, and cancers. Lymph nodes are small structures that filter the lymph fluid that consists of fluids, fats, proteins, and other substances within the body. If cancer exists in the prostate, the first means CIData has of spreading is through the pelvic lymph nodes. Whether cancer is present in any or all of the noses is an important test in determining the appropriate treatment for each patient."
  4045 + "_Summary":"Lymph nodes function as part of the immune system to protect against and fight infection, inflammation, and cancers. Lymph nodes are small structures that filter the lymph fluid that consists of fluids, fats, proteins, and other substances within the body. If cancer exists in the prostate, the first means it has of spreading is through the pelvic lymph nodes. Whether cancer is present in any or all of the noses is an important test in determining the appropriate treatment for each patient."
4046 4046 },
4047 4047 {
4048 4048 "_id":"825",
... ... @@ -4068,7 +4068,7 @@
4068 4068 "_ViewOrientation":"Non-standard",
4069 4069 "_MedicalSpecialty":"Pulmonary Medicine",
4070 4070 "_ImageType":"Illustration",
4071   - "_Summary":"When air is inhaled through the nose or mouth, CIData travels down the trachea to the bronchus, where CIData first enters the lung. From the bronchus, air goes through the bronchi, into the even smaller bronchioles and lastly into the alveoli."
  4071 + "_Summary":"When air is inhaled through the nose or mouth, it travels down the trachea to the bronchus, where it first enters the lung. From the bronchus, air goes through the bronchi, into the even smaller bronchioles and lastly into the alveoli."
4072 4072 },
4073 4073 {
4074 4074 "_id":"827",
... ... @@ -4172,7 +4172,7 @@
4172 4172 "_ViewOrientation":"Anterior",
4173 4173 "_MedicalSpecialty":"Neurology, Pathology, Vascular Medicine",
4174 4174 "_ImageType":"Illustration",
4175   - "_Summary":"High blood pressure is the most important risk factor for stroke. Very high blood pressure can break a blood vessel leading into the brain, so that bleeding occurs in the brain. This can cause a stroke. Also, if a blood clot blocks arteries narrowed by high blood pressure, CIData can also cause a stroke."
  4175 + "_Summary":"High blood pressure is the most important risk factor for stroke. Very high blood pressure can break a blood vessel leading into the brain, so that bleeding occurs in the brain. This can cause a stroke. Also, if a blood clot blocks arteries narrowed by high blood pressure, it can also cause a stroke."
4176 4176 },
4177 4177 {
4178 4178 "_id":"828",
... ... @@ -4268,7 +4268,7 @@
4268 4268 {
4269 4269 "_id":"839",
4270 4270 "_ImageId":"2804",
4271   - "_Title":"When air is inhaled through the nose or mouth, CIData travels down Bronchiole - swollen and constricted",
  4271 + "_Title":"When air is inhaled through the nose or mouth, it travels down Bronchiole - swollen and constricted",
4272 4272 "_contentImage":"ci_img_2804.jpg",
4273 4273 "_ThumbnailImage":"ci_tni_2804.jpg",
4274 4274 "_BodySystem":"Respiratory",
... ... @@ -4302,7 +4302,7 @@
4302 4302 "_ViewOrientation":"Anterior",
4303 4303 "_MedicalSpecialty":"Orthopedics, Physiology",
4304 4304 "_ImageType":"Illustration",
4305   - "_Summary":"Joints, particularly hinge joints like the elbow and the knee, are complex structures made up of bone, muscles, synovium and cartilage and ligaments, designed to bear weight and move the body through space. The knee consists of the femur (thigh bone) above, and the tibia (shin bone) and fibula below. The patella, or kneecap rides on top of the lower portion of the femur and the top portion of the tibia. The muscles and ligaments connect these bones and the space between them is cushioned by fluid-filled capsules (synovia) and cartilage. When muscles are exercised, they pull on the bones, strengthening them. The range of motion of a joint represents how far CIData can be flexed (bent) and extended (stretched)."
  4305 + "_Summary":"Joints, particularly hinge joints like the elbow and the knee, are complex structures made up of bone, muscles, synovium and cartilage and ligaments, designed to bear weight and move the body through space. The knee consists of the femur (thigh bone) above, and the tibia (shin bone) and fibula below. The patella, or kneecap rides on top of the lower portion of the femur and the top portion of the tibia. The muscles and ligaments connect these bones and the space between them is cushioned by fluid-filled capsules (synovia) and cartilage. When muscles are exercised, they pull on the bones, strengthening them. The range of motion of a joint represents how far it can be flexed (bent) and extended (stretched)."
4306 4306 },
4307 4307 {
4308 4308 "_id":"856",
... ... @@ -4354,7 +4354,7 @@
4354 4354 "_ViewOrientation":"Anterior",
4355 4355 "_MedicalSpecialty":"Pulmonary Medicine",
4356 4356 "_ImageType":"Illustration",
4357   - "_Summary":"Sometimes called a \"breathing treatment,\" a nebulizer creates a mist out of your asthma drug, which makes CIData easy and pleasant to breathe the drug into the lungs. If you use a nebulizer, your doctor will prescribe the drugs in liquid form, instead of in a canister."
  4357 + "_Summary":"Sometimes called a \"breathing treatment,\" a nebulizer creates a mist out of your asthma drug, which makes it easy and pleasant to breathe the drug into the lungs. If you use a nebulizer, your doctor will prescribe the drugs in liquid form, instead of in a canister."
4358 4358 },
4359 4359 {
4360 4360 "_id":"851",
... ... @@ -4484,7 +4484,7 @@
4484 4484 "_ViewOrientation":"Lateral",
4485 4485 "_MedicalSpecialty":"Physiology",
4486 4486 "_ImageType":"Illustration",
4487   - "_Summary":"People may lose 20 to 40 percent of their muscle -- and, along with CIData, their strength -- as they age. Scientists have found that a major reason people lose muscle is because they stop doing everyday activities that use muscle power, not just because they grow older."
  4487 + "_Summary":"People may lose 20 to 40 percent of their muscle -- and, along with it, their strength -- as they age. Scientists have found that a major reason people lose muscle is because they stop doing everyday activities that use muscle power, not just because they grow older."
4488 4488 },
4489 4489 {
4490 4490 "_id":"863",
... ... @@ -4601,7 +4601,7 @@
4601 4601 "_ViewOrientation":"Medial",
4602 4602 "_MedicalSpecialty":"Neurology, Opthalmology, Optometry",
4603 4603 "_ImageType":"Illustration",
4604   - "_Summary":"Normal vision occurs when light is focused directly on the retina rather than in front or behind CIData. A person with normal vision can see objects clearly near and faraway. Nearsightedness results in blurred vision when the visual image is focused in front of the retina, rather than directly on CIData. It occurs when the physical length of the eye is greater than the optical length. For this reason, nearsightedness often develops in the rapidly growing school-aged child or teenager, and progresses during the growth years, requiring frequent changes in glasses or contact lenses. A nearsighted person sees near objects clearly, while objects in the distance are blurred. Farsightedness is the result of the visual image being focused behind the retina rather than directly on CIData. It may be caused by the eyeball being too small or the focusing power being too weak. Farsightedness is often present from birth, but children can often tolerate moderate amounts without difficulty and most outgrow the condition. A farsighted person sees faraway objects clearly, while objects that are near are blurred."
  4604 + "_Summary":"Normal vision occurs when light is focused directly on the retina rather than in front or behind it. A person with normal vision can see objects clearly near and faraway. Nearsightedness results in blurred vision when the visual image is focused in front of the retina, rather than directly on it. It occurs when the physical length of the eye is greater than the optical length. For this reason, nearsightedness often develops in the rapidly growing school-aged child or teenager, and progresses during the growth years, requiring frequent changes in glasses or contact lenses. A nearsighted person sees near objects clearly, while objects in the distance are blurred. Farsightedness is the result of the visual image being focused behind the retina rather than directly on it. It may be caused by the eyeball being too small or the focusing power being too weak. Farsightedness is often present from birth, but children can often tolerate moderate amounts without difficulty and most outgrow the condition. A farsighted person sees faraway objects clearly, while objects that are near are blurred."
4605 4605 },
4606 4606 {
4607 4607 "_id":"873",
... ... @@ -4640,7 +4640,7 @@
4640 4640 "_ViewOrientation":"Posterior",
4641 4641 "_MedicalSpecialty":"Orthopedics, Physiology",
4642 4642 "_ImageType":"Illustration",
4643   - "_Summary":"The spine is surrounded by many muscles and ligaments which give CIData great strength and flexibility. If these muscles or ligaments become damaged, back pain results."
  4643 + "_Summary":"The spine is surrounded by many muscles and ligaments which give it great strength and flexibility. If these muscles or ligaments become damaged, back pain results."
4644 4644 },
4645 4645 {
4646 4646 "_id":"894",
... ... @@ -4718,7 +4718,7 @@
4718 4718 "_ViewOrientation":"Anterior",
4719 4719 "_MedicalSpecialty":"Obstetrics and Gynecology (OB/GYN), Oncology (Cancer), Pathology",
4720 4720 "_ImageType":"Illustration",
4721   - "_Summary":"A breast lump may either be a cyst filled with fluid or a solid mass of tissue. A sample of the breast tissue (biopsy) must be made to determine whether malignant (cancerous) cells are present. Almost two-thirds of all breast lumps are benign but the chance of a malignant lump is greatly increased if the woman is past menopause. While the patient is awake and pain-free (using local anesthesia) or asleep and pain-free (using general anesthesia), an incision is made over the lump. The incision for a lumpectomy is usually around 3 to 4 centimeters long. The incision will also depend on the size of the lump that needs to be removed. After the lump is removed in one piece, CIData is sent to the laboratory for immediate examination. If the lump is found to be cancerous nearby lymph nodes will be removed to check for the extent of the cancer spreading."
  4721 + "_Summary":"A breast lump may either be a cyst filled with fluid or a solid mass of tissue. A sample of the breast tissue (biopsy) must be made to determine whether malignant (cancerous) cells are present. Almost two-thirds of all breast lumps are benign but the chance of a malignant lump is greatly increased if the woman is past menopause. While the patient is awake and pain-free (using local anesthesia) or asleep and pain-free (using general anesthesia), an incision is made over the lump. The incision for a lumpectomy is usually around 3 to 4 centimeters long. The incision will also depend on the size of the lump that needs to be removed. After the lump is removed in one piece, it is sent to the laboratory for immediate examination. If the lump is found to be cancerous nearby lymph nodes will be removed to check for the extent of the cancer spreading."
4722 4722 },
4723 4723 {
4724 4724 "_id":"893",
... ... @@ -4809,7 +4809,7 @@
4809 4809 "_ViewOrientation":"Anterior",
4810 4810 "_MedicalSpecialty":"Cardiology",
4811 4811 "_ImageType":"Illustration",
4812   - "_Summary":"A pacemaker is a small, battery-operated electronic device which is inserted under the skin to help the heart beat regularly and at an appropriate rate. The pacemaker has leads that travel through a large vein to the heart, where the wires are anchored. The leads send the electrical impulses to the heart to tell CIData to beat."
  4812 + "_Summary":"A pacemaker is a small, battery-operated electronic device which is inserted under the skin to help the heart beat regularly and at an appropriate rate. The pacemaker has leads that travel through a large vein to the heart, where the wires are anchored. The leads send the electrical impulses to the heart to tell it to beat."
4813 4813 },
4814 4814 {
4815 4815 "_id":"882",
... ... @@ -4822,7 +4822,7 @@
4822 4822 "_ViewOrientation":"Medial, Posterior",
4823 4823 "_MedicalSpecialty":"Orthopedics, Podiatry",
4824 4824 "_ImageType":"Illustration",
4825   - "_Summary":"The plantar fascia is a very thick band of tissue that covers the bones on the bottom of the foot. It extends from the heel to the bones of the ball of the foot and acts like a rubber band to create tension which maintains the arch of the foot. If the band is long CIData allows the arch of the foot to be low, which is most commonly known as having a flat foot. A short band of tissue causes a high arch. This fascia can become inflamed and painful in some people, making walking more difficult."
  4825 + "_Summary":"The plantar fascia is a very thick band of tissue that covers the bones on the bottom of the foot. It extends from the heel to the bones of the ball of the foot and acts like a rubber band to create tension which maintains the arch of the foot. If the band is long it allows the arch of the foot to be low, which is most commonly known as having a flat foot. A short band of tissue causes a high arch. This fascia can become inflamed and painful in some people, making walking more difficult."
4826 4826 },
4827 4827 {
4828 4828 "_id":"884",
... ... @@ -4913,7 +4913,7 @@
4913 4913 "_ViewOrientation":"Anterior",
4914 4914 "_MedicalSpecialty":"Gastroenterology, General Surgery",
4915 4915 "_ImageType":"Illustration",
4916   - "_Summary":"The proximal end of the healthy colon is then brought out to the skin of the abdominal wall, where CIData is sutured in place. An adhesive drainage bag (stoma appliance) is placed around the opening. The abdominal incision is then closed."
  4916 + "_Summary":"The proximal end of the healthy colon is then brought out to the skin of the abdominal wall, where it is sutured in place. An adhesive drainage bag (stoma appliance) is placed around the opening. The abdominal incision is then closed."
4917 4917 },
4918 4918 {
4919 4919 "_id":"898",
... ... @@ -5004,7 +5004,7 @@
5004 5004 "_ViewOrientation":"Non-standard",
5005 5005 "_MedicalSpecialty":"Neurology, Pediatrics",
5006 5006 "_ImageType":"Illustration",
5007   - "_Summary":"The tympanic membrane (eardrum) separates the outer ear from the middle ear. The membrane vibrates when sound waves strike CIData, beginning the process that converts the sound wave into a nerve impulse that travels to the brain."
  5007 + "_Summary":"The tympanic membrane (eardrum) separates the outer ear from the middle ear. The membrane vibrates when sound waves strike it, beginning the process that converts the sound wave into a nerve impulse that travels to the brain."
5008 5008 },
5009 5009 {
5010 5010 "_id":"905",
... ... @@ -5498,7 +5498,7 @@
5498 5498 "_ViewOrientation":"Medial",
5499 5499 "_MedicalSpecialty":"Pathology, Urology",
5500 5500 "_ImageType":"Illustration",
5501   - "_Summary":"A ureterocele is a congenital (from birth) disorder in which the ureter develops an out-pouching as CIData enters the bladder. Ureteroceles usually occur after frequent urinary tract infections. Treatment of the ureterocele usually involves the placement of a stent to relieve the obstruction and/or surgical repair."
  5501 + "_Summary":"A ureterocele is a congenital (from birth) disorder in which the ureter develops an out-pouching as it enters the bladder. Ureteroceles usually occur after frequent urinary tract infections. Treatment of the ureterocele usually involves the placement of a stent to relieve the obstruction and/or surgical repair."
5502 5502 },
5503 5503 {
5504 5504 "_id":"967",
... ... @@ -5537,7 +5537,7 @@
5537 5537 "_ViewOrientation":"Anterior, Lateral",
5538 5538 "_MedicalSpecialty":"Pulmonary Medicine",
5539 5539 "_ImageType":"Illustration",
5540   - "_Summary":"A bronchoscope is a tube with a tiny camera on the end which is inserted through the nose (or mouth) into the lungs. During a bronchoscopy procedure, a scope will be inserted through the nostril until CIData passes through the throat into the trachea and bronchi. A bronchoscope is used to provide a view of the airways of the lung (tracheobronchial tree). The scope also allows the doctor to collect lung secretions and lung tissue for biopsy for tissue specimens."
  5540 + "_Summary":"A bronchoscope is a tube with a tiny camera on the end which is inserted through the nose (or mouth) into the lungs. During a bronchoscopy procedure, a scope will be inserted through the nostril until it passes through the throat into the trachea and bronchi. A bronchoscope is used to provide a view of the airways of the lung (tracheobronchial tree). The scope also allows the doctor to collect lung secretions and lung tissue for biopsy for tissue specimens."
5541 5541 },
5542 5542 {
5543 5543 "_id":"936",
... ... @@ -5615,7 +5615,7 @@
5615 5615 "_ViewOrientation":"Anterior",
5616 5616 "_MedicalSpecialty":"Neurology, Vascular Medicine",
5617 5617 "_ImageType":"Illustration",
5618   - "_Summary":"Intracerebral hemorrhage may be caused by trauma (brain injury) or abnormalities of the blood vessels (aneurysm or angioma). When CIData is not caused by one of these conditions, CIData is most commonly associated with high blood pressure (hypertensive intracerebral hemorrhage)."
  5618 + "_Summary":"Intracerebral hemorrhage may be caused by trauma (brain injury) or abnormalities of the blood vessels (aneurysm or angioma). When it is not caused by one of these conditions, it is most commonly associated with high blood pressure (hypertensive intracerebral hemorrhage)."
5619 5619 },
5620 5620 {
5621 5621 "_id":"944",
... ... @@ -5693,7 +5693,7 @@
5693 5693 "_ViewOrientation":"Anterior",
5694 5694 "_MedicalSpecialty":"Allergy & Immunology, Hematology, Infectious Diseases, Oncology (Cancer)",
5695 5695 "_ImageType":"Illustration",
5696   - "_Summary":"Painless swelling of the feet and ankles is a common problem, particularly in older people. Most of the time swelling can be relieved by elevating the legs above the heart while lying down and avoiding sitting or standing without moving for prolonged periods of time. Although swelling of the feet and ankles can be a minor problem, CIData can also be an indication of more serious illnesses such as heart failure, renal failure, or liver failure."
  5696 + "_Summary":"Painless swelling of the feet and ankles is a common problem, particularly in older people. Most of the time swelling can be relieved by elevating the legs above the heart while lying down and avoiding sitting or standing without moving for prolonged periods of time. Although swelling of the feet and ankles can be a minor problem, it can also be an indication of more serious illnesses such as heart failure, renal failure, or liver failure."
5697 5697 },
5698 5698 {
5699 5699 "_id":"950",
... ... @@ -5771,7 +5771,7 @@
5771 5771 "_ViewOrientation":"Non-standard",
5772 5772 "_MedicalSpecialty":"Dermatology, Microbiology, Physiology, Plastic Surgery",
5773 5773 "_ImageType":"Illustration",
5774   - "_Summary":"The skin is the largest organ of the body. The skin and its derivatives (hair, nails, sweat and oil glands) make up the integumentary system. One of the main functions of the skin is protection. It protects the body from external factors such as bacteria, chemicals, and temperature. The skin contains secretions that can kill bacteria and the pigment melanin provides a chemical pigment defense against ultraviolet light that can damage skin cells. Another important function of the skin is body temperature regulation. When the skin is exposed to a cold temperature, the blood vessels in the dermis constrict. This allows the blood which is warm, to bypass the skin. The skin then becomes the temperature of the cold CIData is exposed to. Body heat is conserved since the blood vessels are not diverting heat to the skin anymore. Among its many functions the skin is an incredible organ always protecting the body from external agents."
  5774 + "_Summary":"The skin is the largest organ of the body. The skin and its derivatives (hair, nails, sweat and oil glands) make up the integumentary system. One of the main functions of the skin is protection. It protects the body from external factors such as bacteria, chemicals, and temperature. The skin contains secretions that can kill bacteria and the pigment melanin provides a chemical pigment defense against ultraviolet light that can damage skin cells. Another important function of the skin is body temperature regulation. When the skin is exposed to a cold temperature, the blood vessels in the dermis constrict. This allows the blood which is warm, to bypass the skin. The skin then becomes the temperature of the cold it is exposed to. Body heat is conserved since the blood vessels are not diverting heat to the skin anymore. Among its many functions the skin is an incredible organ always protecting the body from external agents."
5775 5775 },
5776 5776 {
5777 5777 "_id":"956",
... ... @@ -5875,7 +5875,7 @@
5875 5875 "_ViewOrientation":"Medial",
5876 5876 "_MedicalSpecialty":"Neurology, Orthopedics",
5877 5877 "_ImageType":"Illustration",
5878   - "_Summary":"The ulnar nerve originates from the brachial plexus and travels down arm. The nerve is commonly injured at the elbow because of elbow fracture or dislocation. The ulnar nerve is near the surface of the body where CIData crosses the elbow, so prolonged pressure on the elbow or entrapment of the nerve may cause damage. Damage to the ulnar nerve may involve impaired movement or sensation in the wrist and hand."
  5878 + "_Summary":"The ulnar nerve originates from the brachial plexus and travels down arm. The nerve is commonly injured at the elbow because of elbow fracture or dislocation. The ulnar nerve is near the surface of the body where it crosses the elbow, so prolonged pressure on the elbow or entrapment of the nerve may cause damage. Damage to the ulnar nerve may involve impaired movement or sensation in the wrist and hand."
5879 5879 },
5880 5880 {
5881 5881 "_id":"1071",
... ... @@ -6785,7 +6785,7 @@
6785 6785 "_ViewOrientation":"Anterior",
6786 6786 "_MedicalSpecialty":"Orthopedics",
6787 6787 "_ImageType":"Illustration",
6788   - "_Summary":"Dislocation usually occurs as a result of sudden direction changes while running and the knee is under stress or CIData may occur as a direct result of injury."
  6788 + "_Summary":"Dislocation usually occurs as a result of sudden direction changes while running and the knee is under stress or it may occur as a direct result of injury."
6789 6789 },
6790 6790 {
6791 6791 "_id":"1040",
... ... @@ -6915,7 +6915,7 @@
6915 6915 "_ViewOrientation":"Non-standard",
6916 6916 "_MedicalSpecialty":"Opthalmology, Optometry, Pathology",
6917 6917 "_ImageType":"Illustration",
6918   - "_Summary":"Retinal detachment is a separation of the light-sensitive membrane in the back of the eye (the retina) from its supporting layers. The retina is a transparent membrane at the back of the eye, which processes the images that are focused on CIData by the cornea and the lens. Retinal detachments are often associated with a tear or hole in the retina through which the internal fluids of the eye may leak. This causes separation of the retina from the underlying tissues. During a detachment, bleeding from small retinal blood vessels may cloud the interior of the eye, which is normally filled with vitreous fluid. Central vision becomes severely affected if the macula, the part of the retina responsible for fine vision, becomes detached."
  6918 + "_Summary":"Retinal detachment is a separation of the light-sensitive membrane in the back of the eye (the retina) from its supporting layers. The retina is a transparent membrane at the back of the eye, which processes the images that are focused on it by the cornea and the lens. Retinal detachments are often associated with a tear or hole in the retina through which the internal fluids of the eye may leak. This causes separation of the retina from the underlying tissues. During a detachment, bleeding from small retinal blood vessels may cloud the interior of the eye, which is normally filled with vitreous fluid. Central vision becomes severely affected if the macula, the part of the retina responsible for fine vision, becomes detached."
6919 6919 },
6920 6920 {
6921 6921 "_id":"1052",
... ... @@ -6967,7 +6967,7 @@
6967 6967 "_ViewOrientation":"Lateral",
6968 6968 "_MedicalSpecialty":"Dentistry",
6969 6969 "_ImageType":"Illustration",
6970   - "_Summary":"The most common cause of broken or dislocated jaw is accident or trauma involving a blow to the face. This may be the result of a motor vehicle accident, industrial accident, recreational/sports injury, or other accident. It may also result from assault. The goal of treatment is proper alignment of the jaw bone so the upper and lower teeth come together normally. Surgery is often required for moderate to severe fractures to align and immobilize the bone so CIData can heal."
  6970 + "_Summary":"The most common cause of broken or dislocated jaw is accident or trauma involving a blow to the face. This may be the result of a motor vehicle accident, industrial accident, recreational/sports injury, or other accident. It may also result from assault. The goal of treatment is proper alignment of the jaw bone so the upper and lower teeth come together normally. Surgery is often required for moderate to severe fractures to align and immobilize the bone so it can heal."
6971 6971 },
6972 6972 {
6973 6973 "_id":"1055",
... ... @@ -7006,7 +7006,7 @@
7006 7006 "_ViewOrientation":"Anterior",
7007 7007 "_MedicalSpecialty":"Opthalmology, Optometry",
7008 7008 "_ImageType":"Illustration",
7009   - "_Summary":"Shirmers test is used to determine whether the eye produces enough tears to keep CIData moist. The test is performed by placing filter paper inside the lower lid of the eye. After a few minutes, the paper is removed and tested for its moisture content. Fluorescein eye drops are also used to test if tears can flow through the lacrimal duct into the nose."
  7009 + "_Summary":"Shirmers test is used to determine whether the eye produces enough tears to keep it moist. The test is performed by placing filter paper inside the lower lid of the eye. After a few minutes, the paper is removed and tested for its moisture content. Fluorescein eye drops are also used to test if tears can flow through the lacrimal duct into the nose."
7010 7010 },
7011 7011 {
7012 7012 "_id":"1058",
... ... @@ -7045,7 +7045,7 @@
7045 7045 "_ViewOrientation":"Superior",
7046 7046 "_MedicalSpecialty":"Chiropractic, Neurology, Orthopedics, Pathology",
7047 7047 "_ImageType":"Illustration",
7048   - "_Summary":"When the soft, gelatinous central portion of an intervertebral disk is forced through a weakened part of a disk, CIData is a condition known as a slipped disk. Most herniation takes place in the lumbar area of the spine, and CIData is one of the most common causes of lower back pain. The mainstay of treatment for herniated disks is an initial period of rest with pain and anti-inflammatory medications followed by physical therapy. If pain and symptoms persist, surgery to remove the herniated portion of the intervertebral disk is recommended."
  7048 + "_Summary":"When the soft, gelatinous central portion of an intervertebral disk is forced through a weakened part of a disk, it is a condition known as a slipped disk. Most herniation takes place in the lumbar area of the spine, and it is one of the most common causes of lower back pain. The mainstay of treatment for herniated disks is an initial period of rest with pain and anti-inflammatory medications followed by physical therapy. If pain and symptoms persist, surgery to remove the herniated portion of the intervertebral disk is recommended."
7049 7049 },
7050 7050 {
7051 7051 "_id":"1061",
... ... @@ -7162,7 +7162,7 @@
7162 7162 "_ViewOrientation":"Posterior",
7163 7163 "_MedicalSpecialty":"Chiropractic, Neurology, Orthopedics",
7164 7164 "_ImageType":"Illustration",
7165   - "_Summary":"Pedicle screws are used sometimes in a spinal fusion to add extra support and strength to the fusion while CIData heals. Pedicle screws are placed above and below the vertebrae that were fused. A rod is used to connect the screws which prevents movement and allows the bone graft to heal. After the fusion is completely healed, the screws and rods can be removed. Removal isn't necessary unless they cause the patient discomfort."
  7165 + "_Summary":"Pedicle screws are used sometimes in a spinal fusion to add extra support and strength to the fusion while it heals. Pedicle screws are placed above and below the vertebrae that were fused. A rod is used to connect the screws which prevents movement and allows the bone graft to heal. After the fusion is completely healed, the screws and rods can be removed. Removal isn't necessary unless they cause the patient discomfort."
7166 7166 },
7167 7167 {
7168 7168 "_id":"1075",
... ... @@ -7253,7 +7253,7 @@
7253 7253 "_ViewOrientation":"Lateral",
7254 7254 "_MedicalSpecialty":"Dermatology, Plastic Surgery",
7255 7255 "_ImageType":"Illustration",
7256   - "_Summary":"Usually there is not much discomfort after surgery and pain medication can relieve CIData. Some numbness of the skin is normal and will disappear in a few weeks or months. The head will be elevated on two pillows (or at a 30 degree angle) for a couple of days after surgery to keep the swelling down. The drainage tube will be removed 1 to 2 days after surgery if one was inserted. Bandages are usually removed after 1 to 5 days. The face will look pale, bruised, and puffy, but in 4 to 6 weeks CIData will be looking normal. Most of the stitches will be removed in 5 days. The stitches or metal clips in the hairline could be left in a few days longer if the scalp takes longer to heal."
  7256 + "_Summary":"Usually there is not much discomfort after surgery and pain medication can relieve it. Some numbness of the skin is normal and will disappear in a few weeks or months. The head will be elevated on two pillows (or at a 30 degree angle) for a couple of days after surgery to keep the swelling down. The drainage tube will be removed 1 to 2 days after surgery if one was inserted. Bandages are usually removed after 1 to 5 days. The face will look pale, bruised, and puffy, but in 4 to 6 weeks it will be looking normal. Most of the stitches will be removed in 5 days. The stitches or metal clips in the hairline could be left in a few days longer if the scalp takes longer to heal."
7257 7257 },
7258 7258 {
7259 7259 "_id":"1082",
... ... @@ -7266,7 +7266,7 @@
7266 7266 "_ViewOrientation":"Anterior",
7267 7267 "_MedicalSpecialty":"Emergency Medicine, General Surgery, Urology",
7268 7268 "_ImageType":"Illustration",
7269   - "_Summary":"Testicular torsion occurs when the testicle, normally attached to the scrotum by a small ligament at its base, becomes loose. The testicle can then twist on itself, cutting off its flow of blood. Testicular torsion is considered an emergency. Surgery is usually required, and CIData should be performed within about 5 hours from the onset of symptoms to save the testicle."
  7269 + "_Summary":"Testicular torsion occurs when the testicle, normally attached to the scrotum by a small ligament at its base, becomes loose. The testicle can then twist on itself, cutting off its flow of blood. Testicular torsion is considered an emergency. Surgery is usually required, and it should be performed within about 5 hours from the onset of symptoms to save the testicle."
7270 7270 },
7271 7271 {
7272 7272 "_id":"1083",
... ... @@ -7409,7 +7409,7 @@
7409 7409 "_ViewOrientation":"Posterior",
7410 7410 "_MedicalSpecialty":"Neurology, Orthopedics",
7411 7411 "_ImageType":"Illustration",
7412   - "_Summary":"In a posterolateral gutter fusion procedure, the spine is approached from the back. Bone graft is taken from the pelvis and laid out in the posterolateral portion of the spine that is to be fused. The back muscles hold the graft in place until CIData fuses with the vertebrae. A fusion will setup within three months and will continue to get stronger for one to two years."
  7412 + "_Summary":"In a posterolateral gutter fusion procedure, the spine is approached from the back. Bone graft is taken from the pelvis and laid out in the posterolateral portion of the spine that is to be fused. The back muscles hold the graft in place until it fuses with the vertebrae. A fusion will setup within three months and will continue to get stronger for one to two years."
7413 7413 },
7414 7414 {
7415 7415 "_id":"1094",
... ... @@ -7487,7 +7487,7 @@
7487 7487 "_ViewOrientation":"Anterior",
7488 7488 "_MedicalSpecialty":"Neurology, Opthalmology, Optometry",
7489 7489 "_ImageType":"Illustration",
7490   - "_Summary":"The surgeon performs a keratectomy which creates a corneal flap. A keratectomy is a procedure that uses a small instrument that makes a cut in the cornea as CIData moves across CIData. The flap is lifted and reflected exposing the cornea beneath."
  7490 + "_Summary":"The surgeon performs a keratectomy which creates a corneal flap. A keratectomy is a procedure that uses a small instrument that makes a cut in the cornea as it moves across it. The flap is lifted and reflected exposing the cornea beneath."
7491 7491 },
7492 7492 {
7493 7493 "_id":"1101",
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -49,8 +49,9 @@
49 49  
50 50  
51 51 #termList option:hover {
52   - background-color: #3399FF;
53   - color:#fff;
  52 + background-color: #3399FF !important;
  53 + color: #fff !important;
  54 +
54 55 }
55 56  
56 57  
... ... @@ -136,6 +137,21 @@
136 137 border-radius: 0;
137 138 }
138 139  
  140 + .custom-tooltip-annotation-toolbar {
  141 + background-color: #fff;
  142 + border: 0 none;
  143 + color: #000;
  144 + opacity: 0.9;
  145 + padding: 3px 0;
  146 + position: absolute;
  147 + text-align: center;
  148 + display: none;
  149 + z-index: 10000;
  150 + border: 1px solid #000;
  151 + color: #000;
  152 + border-radius: 0;
  153 + }
  154 +
139 155 </style>
140 156  
141 157  
... ... @@ -440,9 +456,10 @@
440 456 <div class="col-sm-6">
441 457 <h5 class="font13 bolder">Annotation</h5>
442 458 <div class="checkbox no-margin">
443   - <label>
  459 + <!--Settings > The entire highlighted part should be active-->
  460 + <label class="font11 no-margin-btm">
444 461 <input type="checkbox" value="" checked>
445   - <label class="font11 padd-left0 no-margin-btm">Erase Annotations when changing layers</label>
  462 + Erase Annotations when changing layers
446 463 </label>
447 464 </div>
448 465 </div>
... ... @@ -490,18 +507,19 @@
490 507 <div class="col-sm-12">
491 508 <h5>Tools</h5>
492 509 <div class="well well-popup">
493   - <div class="" role="" aria-label="...">
  510 + <div class="" aria-label="...">
494 511 <div class="" role="group" align="center">
495   - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" data-toggle="tooltip" data-placement="top" title="Select Shapes(S)" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button>
496   - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" data-toggle="tooltip" data-placement="top" title="Draw Pin" ng-click="DrPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button>
497   - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" data-toggle="tooltip" data-placement="top" title="Draw Arrow" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button>
498   - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" data-toggle="tooltip" data-placement="top" title="Draw Text" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button>
  512 + <div id="cursor-block" style="display: none; font-size:13px;"></div>
  513 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="mouseMoveToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="mouseOutToolTip()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button>
  514 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="mouseMoveToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="mouseOutToolTip()" ng-click="DrPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button>
  515 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="mouseMoveToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button>
  516 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="mouseMoveToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button>
499 517 </div>
500 518 <div class="" role="group" align="center">
501   - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" data-toggle="tooltip" data-placement="top" title="Draw Line" ng-click="DrLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button>
502   - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" data-toggle="tooltip" data-placement="top" title="Draw Rectangle" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button>
503   - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" data-toggle="tooltip" data-placement="top" title="Draw Circle" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button>
504   - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" data-toggle="tooltip" data-placement="top" title="Draw Polygon" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button>
  519 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="mouseMoveToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="mouseOutToolTip()" ng-click="DrLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button>
  520 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="mouseMoveToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button>
  521 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="mouseMoveToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button>
  522 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="mouseMoveToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button>
505 523 </div>
506 524 </div>
507 525 </div>
... ... @@ -519,33 +537,33 @@
519 537 <div class="well well-popup">
520 538 <div class="" role="group" aria-label="...">
521 539 <div>
522   - <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" id="paintLine" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></button>
523   - <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Erase" ng-click="EraseDrawing()"><i class="fa fa-eraser"></i></button>&nbsp;
524   - <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;">
525   - <div style="width: 58px; float: left;">
526   - <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)">
527   - </div>
528   - <div style="width: 22px; float: left;">
529   - <div style="width: 100%; float: left; height: 16px;">
530   - <button type="button" id="btnBrushSizeIncrement" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
531   -
532   - <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png">
533   - </button>
  540 + <a href="#canvasPaint" data-size="1" data-color="#fff" id="annotationpaintbrushsize" class="btn btn-primary btn-xs pull-left btn-annotation" role="button" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></a>
  541 + <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Erase" ng-click="EraseDrawing()"><i class="fa fa-eraser"></i></button>&nbsp;
  542 + <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;">
  543 + <div style="width: 58px; float: left;">
  544 + <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)">
534 545 </div>
535   - <div style="width: 100%; float: left; height: 16px;">
536   - <button type="button" id="btnBrushSizeDecrease" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
537   - <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png">
538   - </button>
  546 + <div style="width: 22px; float: left;">
  547 + <div style="width: 100%; float: left; height: 16px;">
  548 + <button type="button" id="btnBrushSizeIncrement" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  549 +
  550 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png">
  551 + </button>
  552 + </div>
  553 + <div style="width: 100%; float: left; height: 16px;">
  554 + <button type="button" id="btnBrushSizeDecrease" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  555 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png">
  556 + </button>
  557 + </div>
539 558 </div>
540   - </div>
541 559  
542   - </div>
  560 + </div>
543 561  
544   - <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;">
545   - <div id="slider-range-min-2"></div>
546   - </div>
547   - <div class="clearfix"></div>
548   - </div>
  562 + <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;">
  563 + <div id="slider-range-min-2"></div>
  564 + </div>
  565 + <div class="clearfix"></div>
  566 +</div>
549 567  
550 568 </div>
551 569  
... ... @@ -709,7 +727,7 @@
709 727 <div class="form-group">
710 728 <label class="col-sm-4 control-label" for="System">System</label>
711 729 <div class="col-sm-8">
712   - <select id="bodySystems" class="form-control"></select>
  730 + <select id="bodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystem(this.options[this.selectedIndex].id)"></select>
713 731 </div>
714 732 </div>
715 733 <div class="form-group">
... ... @@ -718,7 +736,7 @@
718 736 <select class="form-control" disabled>
719 737 <option value="1" selected="">Entire View</option>
720 738 </select>
721   - </div>
  739 + </div>
722 740 </div>
723 741 </div>
724 742 </div>
... ... @@ -726,10 +744,9 @@
726 744  
727 745 </div>
728 746  
729   -
730 747 <!--DA > List Manager > Multiple structure selection should not be available.-->
731 748 <div class="form-group">
732   - <select id="termList" class="form-control" size="10"></select>
  749 + <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id)"></select>
733 750 </div>
734 751  
735 752 </div>
... ... @@ -1197,6 +1214,11 @@
1197 1214 if (brushIncrementVar >= 60) {
1198 1215 $("#slider-range-min-2").slider("value", 60);
1199 1216 }
  1217 + else if (brushIncrementVar == "") {
  1218 + var brushIncrementedValue = 1;
  1219 + $("#btnBrushSize").val(brushIncrementedValue);
  1220 + $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue));
  1221 + }
1200 1222 else {
1201 1223 var brushIncrementedValue = parseInt(brushIncrementVar) + 1;
1202 1224 $("#btnBrushSize").val(brushIncrementedValue);
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -160,6 +160,13 @@ footer.dark {
160 160 .space-top50 {
161 161 margin-top: 50px;
162 162 }
  163 +/*Custom ToolTip In AIA*/
  164 +.customTooltip {
  165 + background: #333 !important;
  166 + color: #fff !important;
  167 + /*opacity: 0.9 !important;*/
  168 + }
  169 +
163 170 /*.tools {
164 171 background: #eeeeee none repeat scroll 0 0;
165 172 border: 1px solid #c1c1c1;
... ... @@ -898,4 +905,8 @@ background-image: url(&quot;../../../../../content/images/blank-shapes.png&quot;);
898 905 height:100%;
899 906 background:#fff;
900 907 border-radius: 50%;
901   - }
902 908 \ No newline at end of file
  909 + }
  910 +/*Bug #8679*/
  911 + .selected {
  912 + background-color: lightgrey;
  913 + }
903 914 \ No newline at end of file
... ...