Commit 14c16dec950adef08c981c9094f678b9e236242e

Authored by Birendra
2 parents c72081e8 463c269d

resolved the conflict on Save CB

400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
@@ -1798,9 +1798,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -1798,9 +1798,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1798 1798
1799 $scope.CBEnableUI(); 1799 $scope.CBEnableUI();
1800 // scroll down to first panel 1800 // scroll down to first panel
1801 - var lastpanel = modulePanel[0].id;  
1802 - $('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000);  
1803 - 1801 + if (modulePanel.length > 0) {
  1802 + if (modulePanel[0].id != undefined) {
  1803 + var lastpanel = modulePanel[0].id;
  1804 + //$('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000);
  1805 + }
  1806 + }
  1807 +
  1808 +
1804 } 1809 }
1805 1810
1806 } 1811 }
@@ -2333,11 +2338,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2333,11 +2338,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2333 highlightOptionsSelectedId: 0, 2338 highlightOptionsSelectedId: 0,
2334 selectedStructureID: 0,//N 2339 selectedStructureID: 0,//N
2335 contentDescriptorId: 0, 2340 contentDescriptorId: 0,
2336 - callOuts: $rootScope.DaWindowData[i].CurriculumTermData,  
2337 - hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked,  
2338 - selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate,  
2339 - layerNumber: $rootScope.DaWindowData[i].currentLayerNumber,  
2340 - isModestyOn: $rootScope.DaWindowData[i].isModestyOn, 2341 + callOuts: $rootScope.DaWindowData[i].CurriculumTermData,
  2342 + //hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked,
  2343 + //selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate,
  2344 + layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1,
  2345 + isModestyOn: $rootScope.DaWindowData[i].ModestyValue,
2341 isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated, 2346 isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated,
2342 isTopToolBarVisible: false, //$rootScope.DaWindowData[i].isTopToolBarVisible, 2347 isTopToolBarVisible: false, //$rootScope.DaWindowData[i].isTopToolBarVisible,
2343 clickedTermList: $rootScope.DaWindowData[i].fullTermlist, 2348 clickedTermList: $rootScope.DaWindowData[i].fullTermlist,
@@ -2369,15 +2374,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2369,15 +2374,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2369 containsCapturedContent: true, 2374 containsCapturedContent: true,
2370 //contextMenu: { hideLeftBar: false, hideTitleBar: false, hideTopToolBar: false, lockResize: false }, 2375 //contextMenu: { hideLeftBar: false, hideTitleBar: false, hideTopToolBar: false, lockResize: false },
2371 //activePinArray: $rootScope.DaWindowData[i].activePinArray, // Selected PINID on Body 2376 //activePinArray: $rootScope.DaWindowData[i].activePinArray, // Selected PINID on Body
2372 - //sliderVal: $rootScope.DaWindowData[i].sliderVal,  
2373 - zoom: $rootScope.DaWindowData[i].zoomInOut,  
2374 - skinId: $rootScope.DaWindowData[i].genderId, 2377 + //sliderVal: $rootScope.DaWindowData[i].sliderVal,
  2378 + zoom: $rootScope.DaWindowData[i].zoomInOut,
  2379 + skinId: $rootScope.DaWindowData[i].curentEthnicity,
2375 isResizeLock: false , //.isResizeLock,//N 2380 isResizeLock: false , //.isResizeLock,//N
2376 - mode: $rootScope.DaWindowData[i].isNormalMode, 2381 + mode: $rootScope.DaWindowData[i].mode,
2377 windowListId: 0,//windowData.windowListId,//25 2382 windowListId: 0,//windowData.windowListId,//25
2378 - canvasVScrollX: 0,//canvasVScrollX,//N  
2379 - canvasHScrollX: 0,//canvasHScrollX,//N  
2380 - isCallOutVisible: false, 2383 + canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition,
  2384 + canvasHScrollX: $rootScope.DaWindowData[i].CanvasDivLeftPosition,
  2385 + isCallOutVisible: false,
2381 annotationData: "", // .annotationData,//24 2386 annotationData: "", // .annotationData,//24
2382 transparencyBounds: 0,//windowData.transparencyBounds, 2387 transparencyBounds: 0,//windowData.transparencyBounds,
2383 isLeftToolBarVisible: false, //windowData.isLeftToolBarVisible,//N 2388 isLeftToolBarVisible: false, //windowData.isLeftToolBarVisible,//N
@@ -2393,13 +2398,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ @@ -2393,13 +2398,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2393 } 2398 }
2394 } 2399 }
2395 2400
2396 - $scope.updateWindowsContentForSaveCB = function (currentId) {  
2397 -  
2398 - //$scope.saveDAWindowActivity(currentId); 2401 + $scope.updateWindowsContentForSaveCB = function (currentId) {
  2402 +
  2403 + $scope.saveDAWindowActivity(currentId);
2399 $scope.saveAAWindowActivity(currentId); 2404 $scope.saveAAWindowActivity(currentId);
2400 $scope.saveCIWindowActivity(currentId); 2405 $scope.saveCIWindowActivity(currentId);
2401 $scope.saveCAWindowActivity(currentId); 2406 $scope.saveCAWindowActivity(currentId);
2402 - $scope.save3DWindowActivity(currentId); 2407 + $scope.save3DWindowActivity(currentId);
  2408 +
2403 //$scope.savePicWindowActivity($scope.windowDataforCB); 2409 //$scope.savePicWindowActivity($scope.windowDataforCB);
2404 //if ($scope.updatedWindowListForSaveCB.length > 0) { 2410 //if ($scope.updatedWindowListForSaveCB.length > 0) {
2405 findKeyForChange($rootScope.contentNotesForSaveCB, currentId); 2411 findKeyForChange($rootScope.contentNotesForSaveCB, currentId);
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -146,7 +146,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -146,7 +146,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
146 'height': 0, 146 'height': 0,
147 'minimised': false, 147 'minimised': false,
148 'maximised': false, 148 'maximised': false,
149 - 'id': 0 149 + 'id': 0,
  150 + 'moduleName': '',
  151 + 'mode': ''
150 152
151 }); 153 });
152 154
@@ -246,10 +248,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -246,10 +248,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
246 'height': 0, 248 'height': 0,
247 'minimised': false, 249 'minimised': false,
248 'maximised': false, 250 'maximised': false,
249 - 'id': 0  
250 - });  
251 -  
252 - } 251 + 'id': 0,
  252 + 'moduleName': '',
  253 + 'mode': ''
  254 + });
  255 +
  256 + }
253 } 257 }
254 258
255 259
@@ -752,7 +756,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -752,7 +756,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
752 var isMinimize = $scope.daOpenInOtherModules.minimised; 756 var isMinimize = $scope.daOpenInOtherModules.minimised;
753 $scope.SetwindowStoreData(windowviewid, 'maximised', isMaximize); 757 $scope.SetwindowStoreData(windowviewid, 'maximised', isMaximize);
754 $scope.SetwindowStoreData(windowviewid, 'minimised', isMinimize); 758 $scope.SetwindowStoreData(windowviewid, 'minimised', isMinimize);
755 - 759 + $scope.SetwindowStoreData(windowviewid, 'moduleName', "DISSECTIBLE_ANATOMY");
  760 + $scope.SetwindowStoreData(windowviewid, 'mode', $scope.daOpenInOtherModules.mode);
  761 +
756 $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', '')); 762 $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
757 763
758 if ( $rootScope.BodyViewData == null || $rootScope.BodyViewData == undefined) { 764 if ( $rootScope.BodyViewData == null || $rootScope.BodyViewData == undefined) {
@@ -1594,9 +1600,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -1594,9 +1600,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1594 1600
1595 } 1601 }
1596 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); 1602 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
1597 -  
1598 - if(ModestyValue=="Y")  
1599 - { 1603 +
  1604 + if (ModestyValue == "Y")
  1605 + {
1600 $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true); 1606 $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true);
1601 } 1607 }
1602 else 1608 else
@@ -1785,7 +1791,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -1785,7 +1791,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1785 1791
1786 } 1792 }
1787 else if($scope.daOpenInOtherModules.mode=='EXTRACT') 1793 else if($scope.daOpenInOtherModules.mode=='EXTRACT')
1788 - { 1794 + {
  1795 +
1789 $scope.SetwindowStoreData(windowviewid,'isExtract',true); 1796 $scope.SetwindowStoreData(windowviewid,'isExtract',true);
1790 //Normal only 1797 //Normal only
1791 1798
@@ -2148,7 +2155,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -2148,7 +2155,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2148 if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) { 2155 if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) {
2149 $rootScope.isLayerLessSeven = true; // using at home 2156 $rootScope.isLayerLessSeven = true; // using at home
2150 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); 2157 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
2151 - if ((ModestyValue == 'Y')) { 2158 + if (ModestyValue == 'Y') {
2152 2159
2153 $('.modestyImg_'+windowviewid).css('visibility', 'visible'); 2160 $('.modestyImg_'+windowviewid).css('visibility', 'visible');
2154 } 2161 }
@@ -2773,8 +2780,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -2773,8 +2780,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2773 // Scroll canvas based on CB data 2780 // Scroll canvas based on CB data
2774 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); 2781 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
2775 if (isHighlightBodyWithCBTermData == true) { 2782 if (isHighlightBodyWithCBTermData == true) {
2776 - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);  
2777 - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX); 2783 + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX;
  2784 + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX;
  2785 + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX);
  2786 + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX);
2778 2787
2779 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); 2788 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
2780 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); 2789 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
@@ -2894,6 +2903,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -2894,6 +2903,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2894 2903
2895 imgCanvas.addEventListener('click', function (evt) { 2904 imgCanvas.addEventListener('click', function (evt) {
2896 2905
  2906 + var preTermData; //Use for Remove SpeechBUbble With TermNumber
2897 var len= (evt.currentTarget.id).split("_").length; 2907 var len= (evt.currentTarget.id).split("_").length;
2898 var windowviewid = (evt.currentTarget.id).split("_")[len-1]; 2908 var windowviewid = (evt.currentTarget.id).split("_")[len-1];
2899 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); 2909 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
@@ -2909,13 +2919,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -2909,13 +2919,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2909 } 2919 }
2910 else 2920 else
2911 { 2921 {
2912 - $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);  
2913 - $('#typedTermName_' + windowviewid).val(''); 2922 + preTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
2914 2923
  2924 + $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
  2925 + $('#typedTermName_' + windowviewid).val('');
2915 $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); 2926 $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
2916 $scope.SetwindowStoreData(windowviewid, 'AllTerms', []); 2927 $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
2917 - $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);  
2918 - $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false); 2928 + $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
  2929 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  2930 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
2919 2931
2920 console.log('multiAnnotationIsON: ' + false); 2932 console.log('multiAnnotationIsON: ' + false);
2921 2933
@@ -2987,6 +2999,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -2987,6 +2999,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2987 var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); 2999 var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList');
2988 3000
2989 previousHighlightList.push(RGBColor); 3001 previousHighlightList.push(RGBColor);
  3002 +
  3003 + //Save Term Number to Showing Annotaion for CB Module
  3004 + var AllTerms = $scope.GetwindowStoreData(windowviewid, 'AllTerms');
  3005 + AllTerms.push({ '_TermNumber': RGBColor });
  3006 + var fullTermlist = $scope.GetwindowStoreData(windowviewid, 'fullTermlist');
  3007 + fullTermlist.push(parseInt(RGBColor));
  3008 +
  3009 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  3010 + CurriculumTermData.push({
  3011 + "termNumber": parseInt(RGBColor),
  3012 + "tips_x": parseInt( evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30,
  3013 + "tips_y": parseInt( evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10,
  3014 + "x": evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left,
  3015 + "y": evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top
  3016 + });
  3017 +
  3018 +
2990 3019
2991 if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) { 3020 if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) {
2992 if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { 3021 if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) {
@@ -3054,7 +3083,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3054,7 +3083,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3054 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); 3083 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]);
3055 } 3084 }
3056 3085
3057 - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid); 3086 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor);
3058 } 3087 }
3059 3088
3060 } 3089 }
@@ -3066,18 +3095,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3066,18 +3095,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3066 3095
3067 if ($('#dot_'+windowviewid).length > 0) { 3096 if ($('#dot_'+windowviewid).length > 0) {
3068 $('#dot_'+windowviewid).remove(); 3097 $('#dot_'+windowviewid).remove();
3069 - 3098 +
3070 if ($('#sppeachBubble_'+windowviewid).length > 0) { 3099 if ($('#sppeachBubble_'+windowviewid).length > 0) {
3071 - $('#sppeachBubble_'+windowviewid).remove(); 3100 + $('#sppeachBubble_' + windowviewid).remove();
3072 } 3101 }
3073 if ($('.com_'+windowviewid).length > 0) { 3102 if ($('.com_'+windowviewid).length > 0) {
3074 $('.com_'+windowviewid).remove(); 3103 $('.com_'+windowviewid).remove();
3075 } 3104 }
3076 if ($('#bord_'+windowviewid).length > 0) { 3105 if ($('#bord_'+windowviewid).length > 0) {
3077 $('#bord_'+windowviewid).remove(); 3106 $('#bord_'+windowviewid).remove();
3078 - }  
3079 -  
3080 - 3107 + }
3081 3108
3082 if (TermAnnotationText.length > 0) { 3109 if (TermAnnotationText.length > 0) {
3083 for (var i = 0; i <= TermAnnotationText.length - 1; i++) { 3110 for (var i = 0; i <= TermAnnotationText.length - 1; i++) {
@@ -3087,8 +3114,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3087,8 +3114,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3087 3114
3088 console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); 3115 console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
3089 3116
3090 - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid); 3117 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor);
3091 } 3118 }
  3119 + //Remove previous SpeechBubble with termnumber
  3120 + var TermAnnotationText = $scope.GetwindowStoreData(windowviewid, 'TermAnnotationText');
  3121 + //if (TermAnnotationText[0] != "Skin") {
  3122 + if (preTermData != undefined && preTermData.length > 0) {
  3123 + for (var i = 0; i < preTermData.length; i++) {
  3124 + if (preTermData[i].termNumber != parseInt(RGBColor)) {
  3125 + if ($('#sppeachBubble_' + windowviewid + '-' + preTermData[i].termNumber).length > 0) {
  3126 + $('#sppeachBubble_' + windowviewid + '-' + preTermData[i].termNumber).remove();
  3127 + }
  3128 + }
  3129 +
  3130 + }
  3131 + }
  3132 + //}
  3133 +
3092 } 3134 }
3093 else { 3135 else {
3094 $scope.MultiLanguageAnnationArray = []; 3136 $scope.MultiLanguageAnnationArray = [];
@@ -3100,7 +3142,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3100,7 +3142,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3100 3142
3101 console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); 3143 console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
3102 3144
3103 - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid); 3145 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor);
3104 } 3146 }
3105 } 3147 }
3106 3148
@@ -3212,8 +3254,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3212,8 +3254,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3212 // Scroll canvas based on CB data 3254 // Scroll canvas based on CB data
3213 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); 3255 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
3214 if (isHighlightBodyWithCBTermData == true) { 3256 if (isHighlightBodyWithCBTermData == true) {
3215 - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);  
3216 - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX); 3257 + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX;
  3258 + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX;
  3259 + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX);
  3260 + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX);
3217 3261
3218 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop()); 3262 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
3219 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); 3263 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
@@ -3235,6 +3279,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3235,6 +3279,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3235 $('#spinner').css('visibility', 'visible'); 3279 $('#spinner').css('visibility', 'visible');
3236 $scope.DisableUI(); 3280 $scope.DisableUI();
3237 $scope.highLightBody(windowviewid); 3281 $scope.highLightBody(windowviewid);
  3282 +
  3283 + //Add code for Showing Annotation in Extract mode
  3284 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
  3285 + if (isHighlightBodyWithCBTermData == true) {
  3286 + $scope.ShowCBDataBodyView(windowviewid);
  3287 + }
  3288 + $rootScope.isLoading = false;
  3289 + $('#spinner').css('visibility', 'hidden');
  3290 + $scope.EnableUI();
  3291 +
3238 } 3292 }
3239 else if (isHighLight == true || (isListManagerSelected == true) || ((isGenderChnage == true) && (isHighLight == true)) 3293 else if (isHighLight == true || (isListManagerSelected == true) || ((isGenderChnage == true) && (isHighLight == true))
3240 || ((isViewChange == true) && (isHighLight == true)) || isExtract == true || isHighlightBodyByBodySystem == true) { 3294 || ((isViewChange == true) && (isHighLight == true)) || isExtract == true || isHighlightBodyByBodySystem == true) {
@@ -3316,13 +3370,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3316,13 +3370,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3316 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[j]); 3370 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[j]);
3317 } 3371 }
3318 3372
3319 - $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y,windowviewid); 3373 + $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y, windowviewid, CurriculumTermData[i].termNumber);
3320 } 3374 }
3321 3375
3322 } 3376 }
3323 3377
3324 $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false); 3378 $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
3325 - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); 3379 + //$scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
3326 // finish CB window load 3380 // finish CB window load
3327 $rootScope.DAWindowLoadComplete = true; 3381 $rootScope.DAWindowLoadComplete = true;
3328 3382
@@ -3595,8 +3649,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3595,8 +3649,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3595 // { 3649 // {
3596 // var updatedWhiteImageDataList=$scope.GetwindowStoreData(windowviewid,'updatedWhiteImageDataList'); 3650 // var updatedWhiteImageDataList=$scope.GetwindowStoreData(windowviewid,'updatedWhiteImageDataList');
3597 // updatedWhiteImageDataList[bodyRegionId - 1] = updatedData; 3651 // updatedWhiteImageDataList[bodyRegionId - 1] = updatedData;
3598 - // }  
3599 - 3652 + // }
  3653 +
3600 } 3654 }
3601 else { 3655 else {
3602 if (canvasId.match('_MR')) 3656 if (canvasId.match('_MR'))
@@ -3628,7 +3682,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3628,7 +3682,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3628 } 3682 }
3629 } 3683 }
3630 } 3684 }
  3685 + //Set Canvas Position which saved from CB module
  3686 + //var isExtract = $scope.GetwindowStoreData(windowviewid, 'isExtract')
  3687 + if ($rootScope.isCallFromOtherModule) {
  3688 + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX;
  3689 + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX;
  3690 + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX);
  3691 + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX);
3631 3692
  3693 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
  3694 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
  3695 + }
  3696 +
3632 }; 3697 };
3633 worker.onerror = function (e) { 3698 worker.onerror = function (e) {
3634 alert('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message); 3699 alert('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message);
@@ -3654,10 +3719,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -3654,10 +3719,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3654 3719
3655 $scope.highlightedBR = []; 3720 $scope.highlightedBR = [];
3656 $scope.runningWorkers = []; 3721 $scope.runningWorkers = [];
3657 - 3722 + ;
3658 $timeout(function () { 3723 $timeout(function () {
3659 var MaskCanvasData=$scope.GetwindowStoreData(windowviewid,'MaskCanvasData'); 3724 var MaskCanvasData=$scope.GetwindowStoreData(windowviewid,'MaskCanvasData');
3660 - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); 3725 + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId');
3661 var ColoredImageSRC=$scope.GetwindowStoreData(windowviewid,'ColoredImageSRC'); 3726 var ColoredImageSRC=$scope.GetwindowStoreData(windowviewid,'ColoredImageSRC');
3662 var loopLength = 0; 3727 var loopLength = 0;
3663 if (((viewOrientationId == '1') || (viewOrientationId == '4')) && (ColoredImageSRC.length == 9)) { 3728 if (((viewOrientationId == '1') || (viewOrientationId == '4')) && (ColoredImageSRC.length == 9)) {
@@ -4655,7 +4720,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4655,7 +4720,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4655 $('#dot_'+windowviewid).remove(); 4720 $('#dot_'+windowviewid).remove();
4656 $('#sppeachBubble_'+windowviewid).remove(); 4721 $('#sppeachBubble_'+windowviewid).remove();
4657 $('.com_'+windowviewid).remove(); 4722 $('.com_'+windowviewid).remove();
4658 - $('#bord_'+windowviewid).remove(); 4723 + $('#bord_' + windowviewid).remove();
  4724 +
  4725 + //Remove Annotaion for Slide Changes to Save CB
  4726 + $scope.SetwindowStoreData(windowviewid, 'previousHighlightList', []);
  4727 + $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
  4728 + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
  4729 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  4730 + //$scope.SetwindowStoreData(windowviewid, 'isListManagerSelected', false);
  4731 + //$scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  4732 + //$('#typedTermName_' + windowviewid).val('');
  4733 +
  4734 + $('#typedTermName_' + windowviewid).val('');
4659 4735
4660 if (($("#canvasPaintDA_"+windowviewid).css("display") == "block") && ($("#canvasDA_"+windowviewid).css("display") == "block")) { 4736 if (($("#canvasPaintDA_"+windowviewid).css("display") == "block") && ($("#canvasDA_"+windowviewid).css("display") == "block")) {
4661 if ($rootScope.isAnnotatiomToolBarPopupActive == false) { 4737 if ($rootScope.isAnnotatiomToolBarPopupActive == false) {
@@ -4735,8 +4811,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4735,8 +4811,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4735 } 4811 }
4736 4812
4737 4813
4738 - $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid) {  
4739 - 4814 + $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid, termNumber) {
  4815 +
4740 if (isAnnotationNotForTBox == true) { 4816 if (isAnnotationNotForTBox == true) {
4741 if ($scope.MultiLanguageAnnationArray.length > 1) { 4817 if ($scope.MultiLanguageAnnationArray.length > 1) {
4742 $scope.longestAnnotation = $scope.MultiLanguageAnnationArray.reduce(function (firstAnnotation, seconAnnotation) { return firstAnnotation.length > seconAnnotation.length ? firstAnnotation : seconAnnotation; }); 4818 $scope.longestAnnotation = $scope.MultiLanguageAnnationArray.reduce(function (firstAnnotation, seconAnnotation) { return firstAnnotation.length > seconAnnotation.length ? firstAnnotation : seconAnnotation; });
@@ -4755,8 +4831,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4755,8 +4831,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4755 //2.1 create unique speech bubbles 4831 //2.1 create unique speech bubbles
4756 var speechBubbleCounter=$scope.GetwindowStoreData(windowviewid,'speechBubbleCounter'); 4832 var speechBubbleCounter=$scope.GetwindowStoreData(windowviewid,'speechBubbleCounter');
4757 speechBubbleCounter = speechBubbleCounter + 1; 4833 speechBubbleCounter = speechBubbleCounter + 1;
4758 - $scope.SetwindowStoreData(windowviewid,'speechBubbleCounter',speechBubbleCounter);  
4759 - var id = "speechBubble" + speechBubbleCounter+'_'+windowviewid; 4834 + $scope.SetwindowStoreData(windowviewid, 'speechBubbleCounter', speechBubbleCounter);
  4835 + //if (termNumber == undefined ||) {
  4836 + // var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid;
  4837 + //} else {
  4838 + //var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid + '-' + termNumber;//Add by Sandy for Save Annotation
  4839 + //}
  4840 + if (termNumber != undefined && termNumber != 0) {
  4841 + var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid + '-' + termNumber;//Add by Sandy for Save Annotation
  4842 + }
  4843 +
4760 //2.2 Get clicked locationa and find if it is already clicked earlier too on same location 4844 //2.2 Get clicked locationa and find if it is already clicked earlier too on same location
4761 var pointClicked = parseInt(x) + parseInt(y); 4845 var pointClicked = parseInt(x) + parseInt(y);
4762 var isClickedOnSamePoint = $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked + "]").length; 4846 var isClickedOnSamePoint = $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked + "]").length;
@@ -4770,9 +4854,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4770,9 +4854,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4770 // $scope.SetwindowStoreData(windowviewid,'speechbubbleList',$scope.speechList); 4854 // $scope.SetwindowStoreData(windowviewid,'speechbubbleList',$scope.speechList);
4771 } 4855 }
4772 $('.appendDragg').draggable({ 4856 $('.appendDragg').draggable({
  4857 + containment: '#canvasDivDA_' + windowviewid,
4773 drag: function (evt) { 4858 drag: function (evt) {
4774 - var len= (evt.target.id).split("_").length;  
4775 - var windid = (evt.target.id).split("_")[len-1]; 4859 + var bubbleId = (evt.target.id).split("-")[0];
  4860 + //var len = (evt.target.id).split("_").length;
  4861 + //var windid = (evt.target.id).split("_")[len - 1];
  4862 + var len = (bubbleId).split("_").length;
  4863 + var windid = (bubbleId).split("_")[len - 1];
  4864 +
4776 $(this).prev('div').css("display", "none"); 4865 $(this).prev('div').css("display", "none");
4777 var bor_id = $(this).next('div').attr('id'); 4866 var bor_id = $(this).next('div').attr('id');
4778 var sub_id1 = $(this).attr('id'); 4867 var sub_id1 = $(this).attr('id');
@@ -4789,6 +4878,31 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4789,6 +4878,31 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4789 } 4878 }
4790 } 4879 }
4791 }, 4880 },
  4881 +
  4882 + //Update Annotation Cordianate in case of show multiple Annotation
  4883 + stop: function (evt) {
  4884 + var clickedSpeechBubbleId = $(this).attr("id");
  4885 + var bubbleId = (clickedSpeechBubbleId).split("-")[0];
  4886 + var len = (bubbleId).split("_").length;
  4887 + var windowviewid = (bubbleId).split("_")[len - 1];
  4888 + var sppechBubbleId = $(this).attr("id").substring(12);
  4889 + var termNumber = (clickedSpeechBubbleId).split("-")[1];
  4890 +
  4891 + if ($rootScope.isCallFromOtherModule) {
  4892 + $timeout(function () {
  4893 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  4894 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  4895 + var CurriculumTermData = new jinqJs()
  4896 + .from(CurriculumTermData)
  4897 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  4898 + .at("termNumber == " + termNumber);
  4899 +
  4900 + }, 100);
  4901 +
  4902 + }
  4903 + }
  4904 +
  4905 +
4792 }); 4906 });
4793 $('.dynCross_'+windowviewid).on('click', function (evt) { 4907 $('.dynCross_'+windowviewid).on('click', function (evt) {
4794 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { 4908 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) {
@@ -4800,6 +4914,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4800,6 +4914,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4800 } 4914 }
4801 } 4915 }
4802 } 4916 }
  4917 +
  4918 + //Delete Annotation in case of show multipule annotation
  4919 + var termNumber = removeid.split("-")[1];
  4920 + if ($rootScope.isCallFromOtherModule) {
  4921 + var CurriculumTermData = [];
  4922 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  4923 + CurriculumTermData = new jinqJs()
  4924 + .from(CurriculumTermData)
  4925 + .delete().at("termNumber == " + termNumber).select();
  4926 +
  4927 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
  4928 + }
4803 $(this).parent().parent().parent().remove(); 4929 $(this).parent().parent().parent().remove();
4804 }); 4930 });
4805 } 4931 }
@@ -4807,19 +4933,33 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4807,19 +4933,33 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4807 $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false); 4933 $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false);
4808 //history maintained issue 4934 //history maintained issue
4809 if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { 4935 if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
4810 - $('#sppeachBubble_'+windowviewid).remove();  
4811 - $('#dot_'+windowviewid).remove(); 4936 + //$('#sppeachBubble_'+windowviewid).remove();
  4937 + $('#dot_' + windowviewid).remove();
  4938 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).remove();
4812 } 4939 }
4813 $('.com_'+windowviewid).remove(); 4940 $('.com_'+windowviewid).remove();
4814 $('#bord_'+windowviewid).remove(); 4941 $('#bord_'+windowviewid).remove();
4815 - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y,windowviewid);  
4816 - //history maintained issue  
4817 - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble_'+windowviewid).style.zIndex = "60000"; }  
4818 - $('#sppeachBubble_'+windowviewid).draggable( 4942 + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y, windowviewid, termNumber);
  4943 + //history maintained issue
  4944 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  4945 + //document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.zIndex = "60000";
  4946 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("zIndex", "60000");
  4947 + }
  4948 +
  4949 + $("#bord_" + windowviewid).draggable({
  4950 + containment: '#canvasDivDA_' + windowviewid
  4951 + });
  4952 +
  4953 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).draggable(
4819 { 4954 {
  4955 + containment: '#canvasDivDA_' + windowviewid,
4820 drag: function (evt) { 4956 drag: function (evt) {
4821 - var len= (evt.target.id).split("_").length;  
4822 - var windid = (evt.target.id).split("_")[len-1]; 4957 +
  4958 + var bubbleId = (evt.target.id).split("-")[0];
  4959 + //var len= (evt.target.id).split("_").length;
  4960 + //var windid = (evt.target.id).split("_")[len-1];
  4961 + var len = (bubbleId).split("_").length;
  4962 + var windid = (bubbleId).split("_")[len - 1];
4823 $('#dot_'+windid).css("visibility", "hidden"); 4963 $('#dot_'+windid).css("visibility", "hidden");
4824 var canvasDiv = document.getElementById('canvasDivDA_' + windid) 4964 var canvasDiv = document.getElementById('canvasDivDA_' + windid)
4825 4965
@@ -4827,13 +4967,49 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4827,13 +4967,49 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4827 var horizontlScrollPosition = canvasDiv.scrollLeft; 4967 var horizontlScrollPosition = canvasDiv.scrollLeft;
4828 $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid); 4968 $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid);
4829 }, 4969 },
  4970 + //Update Annotation Cordianate in case of show single Annotation
  4971 + stop: function (evt) {
  4972 + var clickedSpeechBubbleId = $(this).attr("id");
  4973 + var bubbleId = (clickedSpeechBubbleId).split("-")[0];
  4974 + var len = (bubbleId).split("_").length;
  4975 + var windowviewid = (bubbleId).split("_")[len - 1];
  4976 + var sppechBubbleId = $(this).attr("id").substring(12);
  4977 + var termNumber = (clickedSpeechBubbleId).split("-")[1];
  4978 +
  4979 + if ($rootScope.isCallFromOtherModule) {
  4980 + $timeout(function () {
  4981 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  4982 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  4983 + var CurriculumTermData = new jinqJs()
  4984 + .from(CurriculumTermData)
  4985 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  4986 + .at("termNumber == " + termNumber);
  4987 +
  4988 + }, 100);
  4989 +
  4990 + }
  4991 + }
4830 }); 4992 });
4831 $('#crossDiv_'+windowviewid).on('click', function (evt) { 4993 $('#crossDiv_'+windowviewid).on('click', function (evt) {
4832 var len= (evt.target.id).split("_").length; 4994 var len= (evt.target.id).split("_").length;
4833 var windid = (evt.target.id).split("_")[len-1]; 4995 var windid = (evt.target.id).split("_")[len-1];
4834 $('#sppeachBubble_'+windid).remove(); 4996 $('#sppeachBubble_'+windid).remove();
4835 $('#bord_'+windowviewid).remove(); 4997 $('#bord_'+windowviewid).remove();
4836 - $('#dot_'+windid).remove(); 4998 + $('#dot_' + windid).remove();
  4999 +
  5000 + //Delete Annotation in case of show multipule annotation
  5001 + var removeid = $(this).parent().parent().attr('id');
  5002 + var termNumber = removeid.split("-")[1];
  5003 + if ($rootScope.isCallFromOtherModule) {
  5004 + var CurriculumTermData = [];
  5005 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5006 + CurriculumTermData = new jinqJs()
  5007 + .from(CurriculumTermData)
  5008 + .delete().at("termNumber == " + termNumber).select();
  5009 +
  5010 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
  5011 + }
  5012 + $('#' + removeid).remove();
4837 }); 5013 });
4838 } 5014 }
4839 } 5015 }
@@ -4852,6 +5028,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4852,6 +5028,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4852 $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: sub_id_annotation }); 5028 $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: sub_id_annotation });
4853 $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1); 5029 $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1);
4854 $('.appendDragg_annotation').draggable({ 5030 $('.appendDragg_annotation').draggable({
  5031 +
  5032 + containment: '#canvasDivDA_' + windowviewid,
  5033 +
4855 drag: function (evt) { 5034 drag: function (evt) {
4856 var len= (evt.target.id).split("_").length; 5035 var len= (evt.target.id).split("_").length;
4857 var windid = (evt.target.id).split("_")[len-1]; 5036 var windid = (evt.target.id).split("_")[len-1];
@@ -4890,7 +5069,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4890,7 +5069,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4890 $('.dynCross_anno_'+windowviewid).parent().parent().parent().remove(); 5069 $('.dynCross_anno_'+windowviewid).parent().parent().parent().remove();
4891 $scope.createSpeechBubbleBasedOnTransparencyWithoutCtrl(x, y,windowviewid); 5070 $scope.createSpeechBubbleBasedOnTransparencyWithoutCtrl(x, y,windowviewid);
4892 $('#sppeachBubble_annotation_'+windowviewid).draggable( 5071 $('#sppeachBubble_annotation_'+windowviewid).draggable(
4893 - { 5072 + {
  5073 + containment: '#canvasDivDA_' + windowviewid,
4894 drag: function (evt) { 5074 drag: function (evt) {
4895 var len= (evt.target.id).split("_").length; 5075 var len= (evt.target.id).split("_").length;
4896 var windid = (evt.target.id).split("_")[len-1]; 5076 var windid = (evt.target.id).split("_")[len-1];
@@ -4912,15 +5092,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4912,15 +5092,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4912 } 5092 }
4913 5093
4914 5094
4915 - if (document.getElementById('btnStrutureBox_'+windowviewid).name == "showAnnotationStructure") {  
4916 - $scope.showAnnotation(windowviewid) 5095 + if (document.getElementById('btnStrutureBox_' + windowviewid).name == "showAnnotationStructure") {
  5096 + //$scope.showAnnotation(windowviewid);
  5097 + $scope.showAnnotation(windowviewid, termNumber);
4917 } 5098 }
4918 else { 5099 else {
4919 $scope.hideAnnotation(windowviewid) 5100 $scope.hideAnnotation(windowviewid)
4920 } 5101 }
4921 5102
4922 if ($rootScope.isTBCompleted == true) { 5103 if ($rootScope.isTBCompleted == true) {
4923 - $('#sppeachBubble_'+windowviewid).remove(); 5104 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).remove();
4924 $('#dot_'+windowviewid).remove(); 5105 $('#dot_'+windowviewid).remove();
4925 $('#bord_'+windowviewid).remove(); 5106 $('#bord_'+windowviewid).remove();
4926 $('.com_'+windowviewid).remove(); 5107 $('.com_'+windowviewid).remove();
@@ -4928,16 +5109,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -4928,16 +5109,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4928 } 5109 }
4929 } 5110 }
4930 5111
4931 - $scope.showAnnotation = function (windowviewid) { 5112 + $scope.showAnnotation = function (windowviewid, termNumber) {
4932 $('.com_'+windowviewid).show(); 5113 $('.com_'+windowviewid).show();
4933 $('#dot_'+windowviewid).show(); 5114 $('#dot_'+windowviewid).show();
4934 $('#bord_'+windowviewid).show(); 5115 $('#bord_'+windowviewid).show();
4935 - $('#sppeachBubble_'+windowviewid).show(); 5116 + //$('#sppeachBubble_' + windowviewid).show();
  5117 +
4936 $('#sppeachBubble_annotation_'+windowviewid).show(); 5118 $('#sppeachBubble_annotation_'+windowviewid).show();
4937 5119
4938 $('#bord_annotation_'+windowviewid).show(); 5120 $('#bord_annotation_'+windowviewid).show();
4939 $('#dot_annotation_'+windowviewid).show(); 5121 $('#dot_annotation_'+windowviewid).show();
4940 - $('.dynCross_anno_'+windowviewid).parent().parent().parent().show(); 5122 + $('.dynCross_anno_' + windowviewid).parent().parent().parent().show();
  5123 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).show();
4941 } 5124 }
4942 5125
4943 $scope.hideAnnotation = function (windowviewid) { 5126 $scope.hideAnnotation = function (windowviewid) {
@@ -5001,12 +5184,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5001,12 +5184,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5001 5184
5002 } 5185 }
5003 } 5186 }
5004 - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y,windowviewid) {  
5005 - 5187 + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y, windowviewid, termNumber) {
5006 5188
5007 5189
5008 var sppechBubbleDotHTML = '<div id="dot_'+windowviewid +'" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' 5190 var sppechBubbleDotHTML = '<div id="dot_'+windowviewid +'" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>'
5009 - + '<div id="sppeachBubble_'+windowviewid +'" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' 5191 + + '<div id="sppeachBubble_' + windowviewid + '-' + termNumber +'" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">'
5010 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">' 5192 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
5011 + '<img id="crossDiv_'+windowviewid +'" style="width:18px" src=' + $rootScope.path + '></span></div>' 5193 + '<img id="crossDiv_'+windowviewid +'" style="width:18px" src=' + $rootScope.path + '></span></div>'
5012 5194
@@ -5026,16 +5208,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5026,16 +5208,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5026 if ($scope.MultiLanguageAnnationArray.length > 0) { 5208 if ($scope.MultiLanguageAnnationArray.length > 0) {
5027 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { 5209 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
5028 var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; 5210 var MultipleLanguage = $scope.MultiLanguageAnnationArray[i];
5029 - $('#sppeachBubble_'+windowviewid).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>"); 5211 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>");
5030 } 5212 }
5031 } 5213 }
5032 else { 5214 else {
5033 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) 5215 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length)
5034 } 5216 }
5035 if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { 5217 if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) {
5036 - $('#sppeachBubble_'+windowviewid).css("min-width", "auto");  
5037 - $('#sppeachBubble_'+windowviewid).css("white-space", "nowrap"); 5218 + //$('#sppeachBubble_' + windowviewid).css("min-width", "auto");
  5219 + //$('#sppeachBubble_' + windowviewid).css("white-space", "nowrap");
5038 5220
  5221 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("min-width", "auto");
  5222 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("white-space", "nowrap");
  5223 +
5039 } 5224 }
5040 } 5225 }
5041 var Globe = []; 5226 var Globe = [];
@@ -5046,13 +5231,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5046,13 +5231,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5046 document.getElementById('bord_'+windowviewid).style.display = 'block'; 5231 document.getElementById('bord_'+windowviewid).style.display = 'block';
5047 document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px'; 5232 document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px';
5048 document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px'; 5233 document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px';
5049 - document.getElementById('sppeachBubble_'+windowviewid).style.display = 'block';  
5050 - document.getElementById('sppeachBubble_'+windowviewid).style.left = (Globe[0].currentX) + 'px';  
5051 - document.getElementById('sppeachBubble_'+windowviewid).style.top = (Globe[0].currentY) + 'px';  
5052 -  
5053 - 5234 + //document.getElementById('sppeachBubble_'+ windowviewid).style.display = 'block';
  5235 + //document.getElementById('sppeachBubble_'+ windowviewid).style.left = (Globe[0].currentX) + 'px';
  5236 + //document.getElementById('sppeachBubble_'+ windowviewid).style.top = (Globe[0].currentY) + 'px';
5054 5237
  5238 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block';
  5239 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX) + 'px';
  5240 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px';
5055 } 5241 }
  5242 +
5056 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter) { 5243 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter) {
5057 5244
5058 var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div style='z-index:59000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>"; 5245 var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div style='z-index:59000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>";
@@ -5423,7 +5610,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5423,7 +5610,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5423 $('.com_'+windowviewid).remove(); 5610 $('.com_'+windowviewid).remove();
5424 $('#dot_'+windowviewid).remove(); 5611 $('#dot_'+windowviewid).remove();
5425 $('#bord_'+windowviewid).remove(); 5612 $('#bord_'+windowviewid).remove();
5426 - $('#sppeachBubble_'+windowviewid).remove(); 5613 + $('#sppeachBubble_' + windowviewid).remove();
5427 5614
5428 var previewRectangleWidth = $('.rectangle').width(); 5615 var previewRectangleWidth = $('.rectangle').width();
5429 var previewRectangleHeight = $('.rectangle').height() 5616 var previewRectangleHeight = $('.rectangle').height()
@@ -7671,7 +7858,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7671,7 +7858,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7671 $('#bord_annotation_'+windowviewid).remove(); 7858 $('#bord_annotation_'+windowviewid).remove();
7672 7859
7673 $('#dot_'+windowviewid).remove(); 7860 $('#dot_'+windowviewid).remove();
7674 - $('#sppeachBubble_'+windowviewid).remove(); 7861 + $('#sppeachBubble_' + windowviewid).remove();
7675 $('.com_'+windowviewid).remove(); 7862 $('.com_'+windowviewid).remove();
7676 $('#bord_'+windowviewid).remove(); 7863 $('#bord_'+windowviewid).remove();
7677 7864
@@ -8003,7 +8190,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8003,7 +8190,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8003 } 8190 }
8004 8191
8005 $scope.enableHighlight = function (windowviewid) { 8192 $scope.enableHighlight = function (windowviewid) {
8006 - 8193 + $scope.SetwindowStoreData(windowviewid, 'mode', "HIGHLIGHT");
8007 $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', true); 8194 $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', true);
8008 8195
8009 $scope.DisableUI(); 8196 $scope.DisableUI();
@@ -8081,7 +8268,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8081,7 +8268,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8081 } 8268 }
8082 8269
8083 $scope.enableNormalMode = function (windowviewid) { 8270 $scope.enableNormalMode = function (windowviewid) {
8084 - 8271 + $scope.SetwindowStoreData(windowviewid, 'mode', "NORMAL");
8085 $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', true); 8272 $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', true);
8086 8273
8087 $scope.SetwindowStoreData(windowviewid, 'previousHighlightList', []); 8274 $scope.SetwindowStoreData(windowviewid, 'previousHighlightList', []);
@@ -8176,7 +8363,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8176,7 +8363,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8176 } 8363 }
8177 } 8364 }
8178 8365
8179 - //// #7972 Mozilla Firefox> Incorrect navigation 8366 + // #7972 Mozilla Firefox> Incorrect navigation
8180 $("#canvasDiv").scroll(function (event) { 8367 $("#canvasDiv").scroll(function (event) {
8181 var len= (event.currentTarget.id).split("_").length; 8368 var len= (event.currentTarget.id).split("_").length;
8182 var windowviewid = (event.currentTarget.id).split("_")[len-1]; 8369 var windowviewid = (event.currentTarget.id).split("_")[len-1];
@@ -8204,11 +8391,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8204,11 +8391,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8204 }); 8391 });
8205 8392
8206 $scope.enableExtract = function (isCalledFromButton,windowviewid) { 8393 $scope.enableExtract = function (isCalledFromButton,windowviewid) {
8207 - 8394 + $scope.SetwindowStoreData(windowviewid, 'mode', "EXTRACT");
8208 $scope.DisableUI(); 8395 $scope.DisableUI();
8209 8396
8210 console.log('isCalledFromButton= ' + isCalledFromButton); 8397 console.log('isCalledFromButton= ' + isCalledFromButton);
8211 8398
  8399 + var CanvasDivLeftPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivLeftPosition');
  8400 + var CanvasDivTopPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivTopPosition');
  8401 + $('#canvasDivDA_' + windowviewid).scrollTop(CanvasDivTopPosition);
  8402 + $('#canvasDivDA_' + windowviewid).scrollLeft(CanvasDivLeftPosition);
  8403 +
8212 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft()); 8404 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
8213 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop()); 8405 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
8214 8406
@@ -8595,7 +8787,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8595,7 +8787,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8595 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); 8787 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
8596 if (isHighlightBodyWithCBTermData == true) { 8788 if (isHighlightBodyWithCBTermData == true) {
8597 $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false); 8789 $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
8598 - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); 8790 +
  8791 + //$scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  8792 +
8599 // finish CB window load 8793 // finish CB window load
8600 $rootScope.DAWindowLoadComplete = true; 8794 $rootScope.DAWindowLoadComplete = true;
8601 } 8795 }
@@ -9475,9 +9669,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -9475,9 +9669,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9475 9669
9476 } 9670 }
9477 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); 9671 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
9478 -  
9479 - if(ModestyValue=="Y")  
9480 - { 9672 +
  9673 + if (ModestyValue == "Y")
  9674 + {
9481 $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true); 9675 $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true);
9482 } 9676 }
9483 else 9677 else