Merged
Merge Request #994 · created by Birendra Kumar


merge CB changes in DA to Develop

merge CB changes in DA to Develop


From SaveCB_DA into AIA_Develop

Merged by Birendra Kumar

1 participants




400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -196,7 +196,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
196 196 $rootScope.OpenExistingCurriculum = function (event) {
197 197  
198 198 $("#openCBJsonFile").trigger("click");
199   - var fileupload = document.getElementById("openCBJsonFile");
  199 + var fileupload = document.getElementById("openCBJsonFile");
200 200  
201 201 fileupload.onchange = function () {
202 202  
... ... @@ -1796,8 +1796,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1796 1796  
1797 1797 $scope.CBEnableUI();
1798 1798 // scroll down to first panel
1799   - var lastpanel = modulePanel[0].id;
1800   - $('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000);
  1799 + if (modulePanel.length > 0) {
  1800 + if (modulePanel[0].id != undefined) {
  1801 + var lastpanel = modulePanel[0].id;
  1802 + //$('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000);
  1803 + }
  1804 + }
  1805 +
1801 1806  
1802 1807 }
1803 1808  
... ... @@ -2306,10 +2311,10 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2306 2311 selectedStructureID: 0,//N
2307 2312 contentDescriptorId: 0,
2308 2313 callOuts: $rootScope.DaWindowData[i].CurriculumTermData,
2309   - hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked,
2310   - selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate,
2311   - layerNumber: $rootScope.DaWindowData[i].currentLayerNumber,
2312   - isModestyOn: $rootScope.DaWindowData[i].isModestyOn,
  2314 + //hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked,
  2315 + //selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate,
  2316 + layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1,
  2317 + isModestyOn: $rootScope.DaWindowData[i].ModestyValue,
2313 2318 isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated,
2314 2319 isTopToolBarVisible: false, //$rootScope.DaWindowData[i].isTopToolBarVisible,
2315 2320 clickedTermList: $rootScope.DaWindowData[i].fullTermlist,
... ... @@ -2343,12 +2348,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2343 2348 //activePinArray: $rootScope.DaWindowData[i].activePinArray, // Selected PINID on Body
2344 2349 //sliderVal: $rootScope.DaWindowData[i].sliderVal,
2345 2350 zoom: $rootScope.DaWindowData[i].zoomInOut,
2346   - skinId: $rootScope.DaWindowData[i].genderId,
  2351 + skinId: $rootScope.DaWindowData[i].curentEthnicity,
2347 2352 isResizeLock: false , //.isResizeLock,//N
2348   - mode: $rootScope.DaWindowData[i].isNormalMode,
  2353 + mode: $rootScope.DaWindowData[i].mode,
2349 2354 windowListId: 0,//windowData.windowListId,//25
2350   - canvasVScrollX: 0,//canvasVScrollX,//N
2351   - canvasHScrollX: 0,//canvasHScrollX,//N
  2355 + canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition,
  2356 + canvasHScrollX: $rootScope.DaWindowData[i].CanvasDivLeftPosition,
2352 2357 isCallOutVisible: false,
2353 2358 annotationData: "", // .annotationData,//24
2354 2359 transparencyBounds: 0,//windowData.transparencyBounds,
... ... @@ -2367,11 +2372,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2367 2372  
2368 2373 $scope.updateWindowsContentForSaveCB = function (currentId) {
2369 2374  
2370   - //$scope.saveDAWindowActivity(currentId);
  2375 + $scope.saveDAWindowActivity(currentId);
2371 2376 $scope.saveAAWindowActivity(currentId);
2372 2377 $scope.saveCIWindowActivity(currentId);
2373 2378 $scope.saveCAWindowActivity(currentId);
2374 2379 $scope.save3DWindowActivity(currentId);
  2380 +
2375 2381 //$scope.savePicWindowActivity($scope.windowDataforCB);
2376 2382 //if ($scope.updatedWindowListForSaveCB.length > 0) {
2377 2383 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 146 'height': 0,
147 147 'minimised': false,
148 148 'maximised': false,
149   - 'id': 0
  149 + 'id': 0,
  150 + 'moduleName': '',
  151 + 'mode': ''
150 152  
151 153 });
152 154  
... ... @@ -246,7 +248,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
246 248 'height': 0,
247 249 'minimised': false,
248 250 'maximised': false,
249   - 'id': 0
  251 + 'id': 0,
  252 + 'moduleName': '',
  253 + 'mode': ''
250 254 });
251 255  
252 256 }
... ... @@ -747,6 +751,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
747 751 var isMinimize = $scope.daOpenInOtherModules.minimised;
748 752 $scope.SetwindowStoreData(windowviewid, 'maximised', isMaximize);
749 753 $scope.SetwindowStoreData(windowviewid, 'minimised', isMinimize);
  754 + $scope.SetwindowStoreData(windowviewid, 'moduleName', "DISSECTIBLE_ANATOMY");
  755 + $scope.SetwindowStoreData(windowviewid, 'mode', $scope.daOpenInOtherModules.mode);
750 756  
751 757 $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
752 758  
... ... @@ -1604,7 +1610,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1604 1610 }
1605 1611 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
1606 1612  
1607   - if(ModestyValue=="Y")
  1613 + if (ModestyValue == "Y")
1608 1614 {
1609 1615 $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true);
1610 1616 }
... ... @@ -1794,7 +1800,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1794 1800  
1795 1801 }
1796 1802 else if($scope.daOpenInOtherModules.mode=='EXTRACT')
1797   - {
  1803 + {
  1804 +
1798 1805 $scope.SetwindowStoreData(windowviewid,'isExtract',true);
1799 1806 //Normal only
1800 1807  
... ... @@ -2157,7 +2164,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2157 2164 if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) {
2158 2165 $rootScope.isLayerLessSeven = true; // using at home
2159 2166 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
2160   - if ((ModestyValue == 'Y')) {
  2167 + if (ModestyValue == 'Y') {
2161 2168  
2162 2169 $('.modestyImg_'+windowviewid).css('visibility', 'visible');
2163 2170 }
... ... @@ -2782,8 +2789,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2782 2789 // Scroll canvas based on CB data
2783 2790 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
2784 2791 if (isHighlightBodyWithCBTermData == true) {
2785   - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
2786   - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
  2792 + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX;
  2793 + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX;
  2794 + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX);
  2795 + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX);
2787 2796  
2788 2797 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
2789 2798 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
... ... @@ -2903,6 +2912,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2903 2912  
2904 2913 imgCanvas.addEventListener('click', function (evt) {
2905 2914  
  2915 + var preTermData; //Use for Remove SpeechBUbble With TermNumber
2906 2916 var len= (evt.currentTarget.id).split("_").length;
2907 2917 var windowviewid = (evt.currentTarget.id).split("_")[len-1];
2908 2918 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
... ... @@ -2917,14 +2927,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2917 2927 console.log('CTRL ON')
2918 2928 }
2919 2929 else
2920   - {
  2930 + {
  2931 + preTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  2932 +
2921 2933 $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
2922   - $('#typedTermName_' + windowviewid).val('');
2923   -
  2934 + $('#typedTermName_' + windowviewid).val('');
2924 2935 $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
2925 2936 $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
2926 2937 $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
2927   - $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false);
  2938 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  2939 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
2928 2940  
2929 2941 console.log('multiAnnotationIsON: ' + false);
2930 2942  
... ... @@ -2996,6 +3008,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2996 3008 var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList');
2997 3009  
2998 3010 previousHighlightList.push(RGBColor);
  3011 +
  3012 + //Save Term Number to Showing Annotaion for CB Module
  3013 + var AllTerms = $scope.GetwindowStoreData(windowviewid, 'AllTerms');
  3014 + AllTerms.push({ '_TermNumber': RGBColor });
  3015 + var fullTermlist = $scope.GetwindowStoreData(windowviewid, 'fullTermlist');
  3016 + fullTermlist.push(parseInt(RGBColor));
  3017 +
  3018 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  3019 + CurriculumTermData.push({
  3020 + "termNumber": parseInt(RGBColor),
  3021 + "tips_x": parseInt( evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left) + 30,
  3022 + "tips_y": parseInt( evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top) + 10,
  3023 + "x": evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left,
  3024 + "y": evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top
  3025 + });
  3026 +
  3027 +
2999 3028  
3000 3029 if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) {
3001 3030 if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) {
... ... @@ -3063,7 +3092,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3063 3092 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]);
3064 3093 }
3065 3094  
3066   - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid);
  3095 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor);
3067 3096 }
3068 3097  
3069 3098 }
... ... @@ -3075,18 +3104,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3075 3104  
3076 3105 if ($('#dot_'+windowviewid).length > 0) {
3077 3106 $('#dot_'+windowviewid).remove();
3078   -
  3107 +
3079 3108 if ($('#sppeachBubble_'+windowviewid).length > 0) {
3080   - $('#sppeachBubble_'+windowviewid).remove();
  3109 + $('#sppeachBubble_' + windowviewid).remove();
3081 3110 }
3082 3111 if ($('.com_'+windowviewid).length > 0) {
3083 3112 $('.com_'+windowviewid).remove();
3084 3113 }
3085 3114 if ($('#bord_'+windowviewid).length > 0) {
3086 3115 $('#bord_'+windowviewid).remove();
3087   - }
3088   -
3089   -
  3116 + }
3090 3117  
3091 3118 if (TermAnnotationText.length > 0) {
3092 3119 for (var i = 0; i <= TermAnnotationText.length - 1; i++) {
... ... @@ -3096,8 +3123,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3096 3123  
3097 3124 console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
3098 3125  
3099   - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid);
  3126 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor);
3100 3127 }
  3128 + //Remove previous SpeechBubble with termnumber
  3129 + var TermAnnotationText = $scope.GetwindowStoreData(windowviewid, 'TermAnnotationText');
  3130 + //if (TermAnnotationText[0] != "Skin") {
  3131 + if (preTermData != undefined && preTermData.length > 0) {
  3132 + for (var i = 0; i < preTermData.length; i++) {
  3133 + if (preTermData[i].termNumber != parseInt(RGBColor)) {
  3134 + if ($('#sppeachBubble_' + windowviewid + '-' + preTermData[i].termNumber).length > 0) {
  3135 + $('#sppeachBubble_' + windowviewid + '-' + preTermData[i].termNumber).remove();
  3136 + }
  3137 + }
  3138 +
  3139 + }
  3140 + }
  3141 + //}
  3142 +
3101 3143 }
3102 3144 else {
3103 3145 $scope.MultiLanguageAnnationArray = [];
... ... @@ -3109,7 +3151,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3109 3151  
3110 3152 console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length);
3111 3153  
3112   - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid);
  3154 + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0, windowviewid, RGBColor);
3113 3155 }
3114 3156 }
3115 3157  
... ... @@ -3221,8 +3263,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3221 3263 // Scroll canvas based on CB data
3222 3264 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
3223 3265 if (isHighlightBodyWithCBTermData == true) {
3224   - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
3225   - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
  3266 + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX;
  3267 + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX;
  3268 + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX);
  3269 + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX);
3226 3270  
3227 3271 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
3228 3272 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
... ... @@ -3244,6 +3288,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3244 3288 $('#spinner').css('visibility', 'visible');
3245 3289 $scope.DisableUI();
3246 3290 $scope.highLightBody(windowviewid);
  3291 +
  3292 + //Add code for Showing Annotation in Extract mode
  3293 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
  3294 + if (isHighlightBodyWithCBTermData == true) {
  3295 + $scope.ShowCBDataBodyView(windowviewid);
  3296 + }
  3297 + $rootScope.isLoading = false;
  3298 + $('#spinner').css('visibility', 'hidden');
  3299 + $scope.EnableUI();
  3300 +
3247 3301 }
3248 3302 else if (isHighLight == true || (isListManagerSelected == true) || ((isGenderChnage == true) && (isHighLight == true))
3249 3303 || ((isViewChange == true) && (isHighLight == true)) || isExtract == true || isHighlightBodyByBodySystem == true) {
... ... @@ -3325,13 +3379,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3325 3379 $scope.MultiLanguageAnnationArray.push(TermAnnotationText[j]);
3326 3380 }
3327 3381  
3328   - $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y,windowviewid);
  3382 + $scope.createDynamicSpeechBubble('CBAnnotation', CurriculumTermData[i].x, CurriculumTermData[i].y, true, CurriculumTermData[i].tips_x, CurriculumTermData[i].tips_y, windowviewid, CurriculumTermData[i].termNumber);
3329 3383 }
3330 3384  
3331 3385 }
3332 3386  
3333 3387 $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
3334   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  3388 + //$scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
3335 3389 // finish CB window load
3336 3390 $rootScope.DAWindowLoadComplete = true;
3337 3391  
... ... @@ -3604,7 +3658,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3604 3658 // {
3605 3659 // var updatedWhiteImageDataList=$scope.GetwindowStoreData(windowviewid,'updatedWhiteImageDataList');
3606 3660 // updatedWhiteImageDataList[bodyRegionId - 1] = updatedData;
3607   - // }
  3661 + // }
3608 3662  
3609 3663 }
3610 3664 else {
... ... @@ -3637,7 +3691,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3637 3691 }
3638 3692 }
3639 3693 }
3640   -
  3694 + //Set Canvas Position which saved from CB module
  3695 + //var isExtract = $scope.GetwindowStoreData(windowviewid, 'isExtract')
  3696 + if ($rootScope.isCallFromOtherModule) {
  3697 + var canvasHScrollX = $scope.daOpenInOtherModules.canvasHScrollX;
  3698 + var canvasVScrollX = $scope.daOpenInOtherModules.canvasVScrollX;
  3699 + $('#canvasDivDA_' + windowviewid).scrollLeft(canvasHScrollX);
  3700 + $('#canvasDivDA_' + windowviewid).scrollTop(canvasVScrollX);
  3701 +
  3702 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
  3703 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
  3704 + }
  3705 +
3641 3706 };
3642 3707 worker.onerror = function (e) {
3643 3708 alert('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message);
... ... @@ -3663,10 +3728,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3663 3728  
3664 3729 $scope.highlightedBR = [];
3665 3730 $scope.runningWorkers = [];
3666   -
  3731 + ;
3667 3732 $timeout(function () {
3668 3733 var MaskCanvasData=$scope.GetwindowStoreData(windowviewid,'MaskCanvasData');
3669   - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId');
  3734 + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId');
3670 3735 var ColoredImageSRC=$scope.GetwindowStoreData(windowviewid,'ColoredImageSRC');
3671 3736 var loopLength = 0;
3672 3737 if (((viewOrientationId == '1') || (viewOrientationId == '4')) && (ColoredImageSRC.length == 9)) {
... ... @@ -4664,7 +4729,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4664 4729 $('#dot_'+windowviewid).remove();
4665 4730 $('#sppeachBubble_'+windowviewid).remove();
4666 4731 $('.com_'+windowviewid).remove();
4667   - $('#bord_'+windowviewid).remove();
  4732 + $('#bord_' + windowviewid).remove();
  4733 +
  4734 + //Remove Annotaion for Slide Changes to Save CB
  4735 + $scope.SetwindowStoreData(windowviewid, 'previousHighlightList', []);
  4736 + $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
  4737 + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
  4738 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  4739 + //$scope.SetwindowStoreData(windowviewid, 'isListManagerSelected', false);
  4740 + //$scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', false);
  4741 + //$('#typedTermName_' + windowviewid).val('');
  4742 +
  4743 + $('#typedTermName_' + windowviewid).val('');
4668 4744  
4669 4745 if (($("#canvasPaintDA_"+windowviewid).css("display") == "block") && ($("#canvasDA_"+windowviewid).css("display") == "block")) {
4670 4746 if ($rootScope.isAnnotatiomToolBarPopupActive == false) {
... ... @@ -4744,7 +4820,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4744 4820 }
4745 4821  
4746 4822  
4747   - $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid) {
  4823 + $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid, termNumber) {
4748 4824  
4749 4825 if (isAnnotationNotForTBox == true) {
4750 4826 if ($scope.MultiLanguageAnnationArray.length > 1) {
... ... @@ -4764,8 +4840,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4764 4840 //2.1 create unique speech bubbles
4765 4841 var speechBubbleCounter=$scope.GetwindowStoreData(windowviewid,'speechBubbleCounter');
4766 4842 speechBubbleCounter = speechBubbleCounter + 1;
4767   - $scope.SetwindowStoreData(windowviewid,'speechBubbleCounter',speechBubbleCounter);
4768   - var id = "speechBubble" + speechBubbleCounter+'_'+windowviewid;
  4843 + $scope.SetwindowStoreData(windowviewid, 'speechBubbleCounter', speechBubbleCounter);
  4844 + //if (termNumber == undefined ||) {
  4845 + // var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid;
  4846 + //} else {
  4847 + //var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid + '-' + termNumber;//Add by Sandy for Save Annotation
  4848 + //}
  4849 + if (termNumber != undefined && termNumber != 0) {
  4850 + var id = "speechBubble" + speechBubbleCounter + '_' + windowviewid + '-' + termNumber;//Add by Sandy for Save Annotation
  4851 + }
  4852 +
4769 4853 //2.2 Get clicked locationa and find if it is already clicked earlier too on same location
4770 4854 var pointClicked = parseInt(x) + parseInt(y);
4771 4855 var isClickedOnSamePoint = $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked + "]").length;
... ... @@ -4779,9 +4863,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4779 4863 // $scope.SetwindowStoreData(windowviewid,'speechbubbleList',$scope.speechList);
4780 4864 }
4781 4865 $('.appendDragg').draggable({
  4866 + containment: '#canvasDivDA_' + windowviewid,
4782 4867 drag: function (evt) {
4783   - var len= (evt.target.id).split("_").length;
4784   - var windid = (evt.target.id).split("_")[len-1];
  4868 + var bubbleId = (evt.target.id).split("-")[0];
  4869 + //var len = (evt.target.id).split("_").length;
  4870 + //var windid = (evt.target.id).split("_")[len - 1];
  4871 + var len = (bubbleId).split("_").length;
  4872 + var windid = (bubbleId).split("_")[len - 1];
  4873 +
4785 4874 $(this).prev('div').css("display", "none");
4786 4875 var bor_id = $(this).next('div').attr('id');
4787 4876 var sub_id1 = $(this).attr('id');
... ... @@ -4798,6 +4887,31 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4798 4887 }
4799 4888 }
4800 4889 },
  4890 +
  4891 + //Update Annotation Cordianate in case of show multiple Annotation
  4892 + stop: function (evt) {
  4893 + var clickedSpeechBubbleId = $(this).attr("id");
  4894 + var bubbleId = (clickedSpeechBubbleId).split("-")[0];
  4895 + var len = (bubbleId).split("_").length;
  4896 + var windowviewid = (bubbleId).split("_")[len - 1];
  4897 + var sppechBubbleId = $(this).attr("id").substring(12);
  4898 + var termNumber = (clickedSpeechBubbleId).split("-")[1];
  4899 +
  4900 + if ($rootScope.isCallFromOtherModule) {
  4901 + $timeout(function () {
  4902 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  4903 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  4904 + var CurriculumTermData = new jinqJs()
  4905 + .from(CurriculumTermData)
  4906 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  4907 + .at("termNumber == " + termNumber);
  4908 +
  4909 + }, 100);
  4910 +
  4911 + }
  4912 + }
  4913 +
  4914 +
4801 4915 });
4802 4916 $('.dynCross_'+windowviewid).on('click', function (evt) {
4803 4917 if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) {
... ... @@ -4809,6 +4923,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4809 4923 }
4810 4924 }
4811 4925 }
  4926 +
  4927 + //Delete Annotation in case of show multipule annotation
  4928 + var termNumber = removeid.split("-")[1];
  4929 + if ($rootScope.isCallFromOtherModule) {
  4930 + var CurriculumTermData = [];
  4931 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  4932 + CurriculumTermData = new jinqJs()
  4933 + .from(CurriculumTermData)
  4934 + .delete().at("termNumber == " + termNumber).select();
  4935 +
  4936 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
  4937 + }
4812 4938 $(this).parent().parent().parent().remove();
4813 4939 });
4814 4940 }
... ... @@ -4816,19 +4942,33 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4816 4942 $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',false);
4817 4943 //history maintained issue
4818 4944 if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
4819   - $('#sppeachBubble_'+windowviewid).remove();
4820   - $('#dot_'+windowviewid).remove();
  4945 + //$('#sppeachBubble_'+windowviewid).remove();
  4946 + $('#dot_' + windowviewid).remove();
  4947 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).remove();
4821 4948 }
4822 4949 $('.com_'+windowviewid).remove();
4823 4950 $('#bord_'+windowviewid).remove();
4824   - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y,windowviewid);
4825   - //history maintained issue
4826   - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble_'+windowviewid).style.zIndex = "60000"; }
4827   - $('#sppeachBubble_'+windowviewid).draggable(
  4951 + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl(x, y, windowviewid, termNumber);
  4952 + //history maintained issue
  4953 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  4954 + //document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.zIndex = "60000";
  4955 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("zIndex", "60000");
  4956 + }
  4957 +
  4958 + $("#bord_" + windowviewid).draggable({
  4959 + containment: '#canvasDivDA_' + windowviewid
  4960 + });
  4961 +
  4962 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).draggable(
4828 4963 {
  4964 + containment: '#canvasDivDA_' + windowviewid,
4829 4965 drag: function (evt) {
4830   - var len= (evt.target.id).split("_").length;
4831   - var windid = (evt.target.id).split("_")[len-1];
  4966 +
  4967 + var bubbleId = (evt.target.id).split("-")[0];
  4968 + //var len= (evt.target.id).split("_").length;
  4969 + //var windid = (evt.target.id).split("_")[len-1];
  4970 + var len = (bubbleId).split("_").length;
  4971 + var windid = (bubbleId).split("_")[len - 1];
4832 4972 $('#dot_'+windid).css("visibility", "hidden");
4833 4973 var canvasDiv = document.getElementById('canvasDivDA_' + windid)
4834 4974  
... ... @@ -4836,13 +4976,49 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4836 4976 var horizontlScrollPosition = canvasDiv.scrollLeft;
4837 4977 $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windid).offset().top, true,windid);
4838 4978 },
  4979 + //Update Annotation Cordianate in case of show single Annotation
  4980 + stop: function (evt) {
  4981 + var clickedSpeechBubbleId = $(this).attr("id");
  4982 + var bubbleId = (clickedSpeechBubbleId).split("-")[0];
  4983 + var len = (bubbleId).split("_").length;
  4984 + var windowviewid = (bubbleId).split("_")[len - 1];
  4985 + var sppechBubbleId = $(this).attr("id").substring(12);
  4986 + var termNumber = (clickedSpeechBubbleId).split("-")[1];
  4987 +
  4988 + if ($rootScope.isCallFromOtherModule) {
  4989 + $timeout(function () {
  4990 + var CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  4991 + var BubleObj = document.getElementById(clickedSpeechBubbleId);
  4992 + var CurriculumTermData = new jinqJs()
  4993 + .from(CurriculumTermData)
  4994 + .update(function (coll, index) { coll[index].tips_x = BubleObj.offsetLeft; coll[index].tips_y = BubleObj.offsetTop; })
  4995 + .at("termNumber == " + termNumber);
  4996 +
  4997 + }, 100);
  4998 +
  4999 + }
  5000 + }
4839 5001 });
4840 5002 $('#crossDiv_'+windowviewid).on('click', function (evt) {
4841 5003 var len= (evt.target.id).split("_").length;
4842 5004 var windid = (evt.target.id).split("_")[len-1];
4843 5005 $('#sppeachBubble_'+windid).remove();
4844 5006 $('#bord_'+windowviewid).remove();
4845   - $('#dot_'+windid).remove();
  5007 + $('#dot_' + windid).remove();
  5008 +
  5009 + //Delete Annotation in case of show multipule annotation
  5010 + var removeid = $(this).parent().parent().attr('id');
  5011 + var termNumber = removeid.split("-")[1];
  5012 + if ($rootScope.isCallFromOtherModule) {
  5013 + var CurriculumTermData = [];
  5014 + CurriculumTermData = $scope.GetwindowStoreData(windowviewid, 'CurriculumTermData');
  5015 + CurriculumTermData = new jinqJs()
  5016 + .from(CurriculumTermData)
  5017 + .delete().at("termNumber == " + termNumber).select();
  5018 +
  5019 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', CurriculumTermData);
  5020 + }
  5021 + $('#' + removeid).remove();
4846 5022 });
4847 5023 }
4848 5024 }
... ... @@ -4861,6 +5037,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4861 5037 $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: sub_id_annotation });
4862 5038 $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1);
4863 5039 $('.appendDragg_annotation').draggable({
  5040 +
  5041 + containment: '#canvasDivDA_' + windowviewid,
  5042 +
4864 5043 drag: function (evt) {
4865 5044 var len= (evt.target.id).split("_").length;
4866 5045 var windid = (evt.target.id).split("_")[len-1];
... ... @@ -4899,7 +5078,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4899 5078 $('.dynCross_anno_'+windowviewid).parent().parent().parent().remove();
4900 5079 $scope.createSpeechBubbleBasedOnTransparencyWithoutCtrl(x, y,windowviewid);
4901 5080 $('#sppeachBubble_annotation_'+windowviewid).draggable(
4902   - {
  5081 + {
  5082 + containment: '#canvasDivDA_' + windowviewid,
4903 5083 drag: function (evt) {
4904 5084 var len= (evt.target.id).split("_").length;
4905 5085 var windid = (evt.target.id).split("_")[len-1];
... ... @@ -4921,15 +5101,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4921 5101 }
4922 5102  
4923 5103  
4924   - if (document.getElementById('btnStrutureBox_'+windowviewid).name == "showAnnotationStructure") {
4925   - $scope.showAnnotation(windowviewid)
  5104 + if (document.getElementById('btnStrutureBox_' + windowviewid).name == "showAnnotationStructure") {
  5105 + //$scope.showAnnotation(windowviewid);
  5106 + $scope.showAnnotation(windowviewid, termNumber);
4926 5107 }
4927 5108 else {
4928 5109 $scope.hideAnnotation(windowviewid)
4929 5110 }
4930 5111  
4931 5112 if ($rootScope.isTBCompleted == true) {
4932   - $('#sppeachBubble_'+windowviewid).remove();
  5113 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).remove();
4933 5114 $('#dot_'+windowviewid).remove();
4934 5115 $('#bord_'+windowviewid).remove();
4935 5116 $('.com_'+windowviewid).remove();
... ... @@ -4937,16 +5118,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4937 5118 }
4938 5119 }
4939 5120  
4940   - $scope.showAnnotation = function (windowviewid) {
  5121 + $scope.showAnnotation = function (windowviewid, termNumber) {
4941 5122 $('.com_'+windowviewid).show();
4942 5123 $('#dot_'+windowviewid).show();
4943 5124 $('#bord_'+windowviewid).show();
4944   - $('#sppeachBubble_'+windowviewid).show();
  5125 + //$('#sppeachBubble_' + windowviewid).show();
  5126 +
4945 5127 $('#sppeachBubble_annotation_'+windowviewid).show();
4946 5128  
4947 5129 $('#bord_annotation_'+windowviewid).show();
4948 5130 $('#dot_annotation_'+windowviewid).show();
4949   - $('.dynCross_anno_'+windowviewid).parent().parent().parent().show();
  5131 + $('.dynCross_anno_' + windowviewid).parent().parent().parent().show();
  5132 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).show();
4950 5133 }
4951 5134  
4952 5135 $scope.hideAnnotation = function (windowviewid) {
... ... @@ -5010,12 +5193,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5010 5193  
5011 5194 }
5012 5195 }
5013   - $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y,windowviewid) {
5014   -
  5196 + $scope.createSpeechBubbleBasedOnAnnotationLengthwithoutCtrl = function (x, y, windowviewid, termNumber) {
5015 5197  
5016 5198  
5017 5199 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>'
5018   - + '<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;">'
  5200 + + '<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;">'
5019 5201 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
5020 5202 + '<img id="crossDiv_'+windowviewid +'" style="width:18px" src=' + $rootScope.path + '></span></div>'
5021 5203  
... ... @@ -5035,15 +5217,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5035 5217 if ($scope.MultiLanguageAnnationArray.length > 0) {
5036 5218 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
5037 5219 var MultipleLanguage = $scope.MultiLanguageAnnationArray[i];
5038   - $('#sppeachBubble_'+windowviewid).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>");
  5220 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>");
5039 5221 }
5040 5222 }
5041 5223 else {
5042 5224 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length)
5043 5225 }
5044 5226 if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) {
5045   - $('#sppeachBubble_'+windowviewid).css("min-width", "auto");
5046   - $('#sppeachBubble_'+windowviewid).css("white-space", "nowrap");
  5227 + //$('#sppeachBubble_' + windowviewid).css("min-width", "auto");
  5228 + //$('#sppeachBubble_' + windowviewid).css("white-space", "nowrap");
  5229 +
  5230 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("min-width", "auto");
  5231 + $('#sppeachBubble_' + windowviewid + '-' + termNumber).css("white-space", "nowrap");
5047 5232  
5048 5233 }
5049 5234 }
... ... @@ -5055,13 +5240,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5055 5240 document.getElementById('bord_'+windowviewid).style.display = 'block';
5056 5241 document.getElementById('bord_'+windowviewid).style.left = ((Globe[0].currentX) - 2) + 'px';
5057 5242 document.getElementById('bord_'+windowviewid).style.top = ((Globe[0].currentY) + 1) + 'px';
5058   - document.getElementById('sppeachBubble_'+windowviewid).style.display = 'block';
5059   - document.getElementById('sppeachBubble_'+windowviewid).style.left = (Globe[0].currentX) + 'px';
5060   - document.getElementById('sppeachBubble_'+windowviewid).style.top = (Globe[0].currentY) + 'px';
5061   -
5062   -
  5243 + //document.getElementById('sppeachBubble_'+ windowviewid).style.display = 'block';
  5244 + //document.getElementById('sppeachBubble_'+ windowviewid).style.left = (Globe[0].currentX) + 'px';
  5245 + //document.getElementById('sppeachBubble_'+ windowviewid).style.top = (Globe[0].currentY) + 'px';
5063 5246  
  5247 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.display = 'block';
  5248 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.left = (Globe[0].currentX) + 'px';
  5249 + document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px';
5064 5250 }
  5251 +
5065 5252 $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter) {
5066 5253  
5067 5254 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>";
... ... @@ -5432,7 +5619,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5432 5619 $('.com_'+windowviewid).remove();
5433 5620 $('#dot_'+windowviewid).remove();
5434 5621 $('#bord_'+windowviewid).remove();
5435   - $('#sppeachBubble_'+windowviewid).remove();
  5622 + $('#sppeachBubble_' + windowviewid).remove();
5436 5623  
5437 5624 var previewRectangleWidth = $('.rectangle').width();
5438 5625 var previewRectangleHeight = $('.rectangle').height()
... ... @@ -7680,7 +7867,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7680 7867 $('#bord_annotation_'+windowviewid).remove();
7681 7868  
7682 7869 $('#dot_'+windowviewid).remove();
7683   - $('#sppeachBubble_'+windowviewid).remove();
  7870 + $('#sppeachBubble_' + windowviewid).remove();
7684 7871 $('.com_'+windowviewid).remove();
7685 7872 $('#bord_'+windowviewid).remove();
7686 7873  
... ... @@ -8012,7 +8199,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8012 8199 }
8013 8200  
8014 8201 $scope.enableHighlight = function (windowviewid) {
8015   -
  8202 + $scope.SetwindowStoreData(windowviewid, 'mode', "HIGHLIGHT");
8016 8203 $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', true);
8017 8204  
8018 8205 $scope.DisableUI();
... ... @@ -8090,7 +8277,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8090 8277 }
8091 8278  
8092 8279 $scope.enableNormalMode = function (windowviewid) {
8093   -
  8280 + $scope.SetwindowStoreData(windowviewid, 'mode', "NORMAL");
8094 8281 $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', true);
8095 8282  
8096 8283 $scope.SetwindowStoreData(windowviewid, 'previousHighlightList', []);
... ... @@ -8185,7 +8372,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8185 8372 }
8186 8373 }
8187 8374  
8188   - //// #7972 Mozilla Firefox> Incorrect navigation
  8375 + // #7972 Mozilla Firefox> Incorrect navigation
8189 8376 $("#canvasDiv").scroll(function (event) {
8190 8377 var len= (event.currentTarget.id).split("_").length;
8191 8378 var windowviewid = (event.currentTarget.id).split("_")[len-1];
... ... @@ -8213,10 +8400,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8213 8400 });
8214 8401  
8215 8402 $scope.enableExtract = function (isCalledFromButton,windowviewid) {
8216   -
  8403 + $scope.SetwindowStoreData(windowviewid, 'mode', "EXTRACT");
8217 8404 $scope.DisableUI();
8218 8405  
8219 8406 console.log('isCalledFromButton= ' + isCalledFromButton);
  8407 +
  8408 + var CanvasDivLeftPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivLeftPosition');
  8409 + var CanvasDivTopPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivTopPosition');
  8410 + $('#canvasDivDA_' + windowviewid).scrollTop(CanvasDivTopPosition);
  8411 + $('#canvasDivDA_' + windowviewid).scrollLeft(CanvasDivLeftPosition);
8220 8412  
8221 8413 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
8222 8414 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
... ... @@ -8604,7 +8796,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8604 8796 var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
8605 8797 if (isHighlightBodyWithCBTermData == true) {
8606 8798 $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
8607   - $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  8799 +
  8800 + //$scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  8801 +
8608 8802 // finish CB window load
8609 8803 $rootScope.DAWindowLoadComplete = true;
8610 8804 }
... ... @@ -9485,7 +9679,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9485 9679 }
9486 9680 var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
9487 9681  
9488   - if(ModestyValue=="Y")
  9682 + if (ModestyValue == "Y")
9489 9683 {
9490 9684 $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true);
9491 9685 }
... ...