Commit e2e2cd6d40dbd4381f372170d077f260f84a1ec2
1 parent
66b97347
Create automeically TBox for display after SaveCB
Showing
3 changed files
with
92 additions
and
41 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -2384,12 +2384,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2384 | 2384 | searchSelectedText: $rootScope.DaWindowData[i].searchSelectedText, |
2385 | 2385 | prevId: $rootScope.DaWindowData[i].prevId, //ActualTermnumber for chnages body image |
2386 | 2386 | |
2387 | - isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated, | |
2387 | + isTransparent: $rootScope.DaWindowData[i].isTransparent, | |
2388 | 2388 | transparencyBounds: $rootScope.DaWindowData[i].transparencyBounds, |
2389 | 2389 | transparencyValue: $rootScope.DaWindowData[i].transNumber, |
2390 | 2390 | layerNumberTransparency: $rootScope.DaWindowData[i].layerNumberTransparency, |
2391 | 2391 | transparencyX: $rootScope.DaWindowData[i].transparencyX, |
2392 | - transparencyY: $rootScope.DaWindowData[i].transparencyY | |
2392 | + transparencyY: $rootScope.DaWindowData[i].transparencyY, | |
2393 | + layerNumberBeforeTBDraw: $rootScope.DaWindowData[i].layerNumberBeforeTBDraw | |
2394 | + | |
2393 | 2395 | |
2394 | 2396 | }); |
2395 | 2397 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -153,7 +153,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
153 | 153 | 'layerNumberTransparency': 0, |
154 | 154 | 'transparencyValue': 0, |
155 | 155 | 'transparencyX': 0, |
156 | - 'transparencyY': 0 | |
156 | + 'transparencyY': 0, | |
157 | + 'isTransparent': false | |
157 | 158 | |
158 | 159 | }); |
159 | 160 | |
... | ... | @@ -260,7 +261,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
260 | 261 | 'layerNumberTransparency': 0, |
261 | 262 | 'transparencyValue': 0, |
262 | 263 | 'transparencyX': 0, |
263 | - 'transparencyY': 0 | |
264 | + 'transparencyY': 0, | |
265 | + 'isTransparent': false | |
264 | 266 | }); |
265 | 267 | |
266 | 268 | } |
... | ... | @@ -768,7 +770,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
768 | 770 | $scope.SetwindowStoreData(windowviewid, 'minimised', isMinimize); |
769 | 771 | $scope.SetwindowStoreData(windowviewid, 'moduleName', "DISSECTIBLE_ANATOMY"); |
770 | 772 | $scope.SetwindowStoreData(windowviewid, 'mode', $scope.daOpenInOtherModules.mode); |
771 | - $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', $scope.daOpenInOtherModules.isTransparent); | |
773 | + //$scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', $scope.daOpenInOtherModules.isTransparent); | |
774 | + $scope.SetwindowStoreData(windowviewid, 'isTransparent', $scope.daOpenInOtherModules.isTransparent); | |
772 | 775 | if ($scope.daOpenInOtherModules.transparencyBounds != undefined) { |
773 | 776 | $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', $scope.daOpenInOtherModules.transparencyBounds); |
774 | 777 | } |
... | ... | @@ -778,9 +781,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
778 | 781 | $scope.SetwindowStoreData(windowviewid, 'transparencyY', $scope.daOpenInOtherModules.transparencyY); |
779 | 782 | $scope.SetwindowStoreData(windowviewid, 'transNumber', $scope.daOpenInOtherModules.transparencyValue) |
780 | 783 | if ($scope.daOpenInOtherModules.transparencyValue == 0.5) { |
781 | - $scope.SetwindowStoreData(windowviewid, 'transNumber', 50); | |
784 | + $scope.SetwindowStoreData(windowviewid, 'transNumber', 100); | |
785 | + } | |
786 | + $scope.SetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw', $scope.daOpenInOtherModules.layerNumberBeforeTBDraw); | |
787 | + if ($scope.daOpenInOtherModules.isTransparent) { | |
788 | + $scope.SetwindowStoreData(windowviewid, 'layerNumber', $scope.daOpenInOtherModules.layerNumberBeforeTBDraw); | |
782 | 789 | } |
783 | - | |
784 | 790 | |
785 | 791 | $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', '')); |
786 | 792 | |
... | ... | @@ -1151,6 +1157,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1151 | 1157 | scope.LayerChange(windviewid); |
1152 | 1158 | $("#annotationpaintbrushsize").removeClass("activebtncolor"); |
1153 | 1159 | $("#annotationpainteraser").removeClass("activebtncolor"); |
1160 | + | |
1161 | + if ($scope.GetwindowStoreData(windviewid, 'isTransparent')) { | |
1162 | + $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', slideVal); | |
1163 | + } //else { $scope.SetwindowStoreData(windowviewid, 'currentLayerNumber', slideVal); } | |
1154 | 1164 | }); |
1155 | 1165 | }, |
1156 | 1166 | |
... | ... | @@ -3346,6 +3356,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3346 | 3356 | $scope.EnableUI(); |
3347 | 3357 | } |
3348 | 3358 | |
3359 | + //Added Code by sandy to create Draw transparencybox autometically for save CB | |
3360 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3361 | + $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
3362 | + //$scope.setOriginalDataAndChangeTransparency(windowviewid); | |
3363 | + // finish CB window load | |
3364 | + $rootScope.DAWindowLoadComplete = true; | |
3365 | + | |
3366 | + } | |
3367 | + | |
3349 | 3368 | } |
3350 | 3369 | |
3351 | 3370 | } |
... | ... | @@ -5648,7 +5667,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5648 | 5667 | |
5649 | 5668 | //to prevent screen scroll on ipad while drawing TB |
5650 | 5669 | e.preventDefault(); |
5651 | - | |
5670 | + //$scope.SetwindowStoreData(windowviewid, 'isTransparent', true); | |
5652 | 5671 | $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', false); |
5653 | 5672 | $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', true); |
5654 | 5673 | $scope.SetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isNormalMode')); |
... | ... | @@ -5954,9 +5973,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5954 | 5973 | $('#transparencyScale_' + windowviewid).draggable({ containment: '#canvasDivDA_' + windowviewid }); |
5955 | 5974 | |
5956 | 5975 | $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', transparencyBounds); |
5957 | - $scope.SetwindowStoreData(windowviewid, 'transparencyValue', 0); | |
5958 | - $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0); | |
5959 | - $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.TBDrawStart); | |
5976 | + //$scope.SetwindowStoreData(windowviewid, 'transparencyValue', 0); | |
5977 | + //$scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0); | |
5978 | + $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.TBDrawStartX); | |
5960 | 5979 | $scope.SetwindowStoreData(windowviewid, 'transparencyY', $scope.TBDrawStartY ); |
5961 | 5980 | } |
5962 | 5981 | $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 10) |
... | ... | @@ -6047,6 +6066,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6047 | 6066 | //$scope.TransparencyBoxStartY = $rootScope.CommonTBSartY; |
6048 | 6067 | //$scope.TransparencyEndX = $rootScope.commonTBEndX; |
6049 | 6068 | //$scope.TransparencyBoxEndY = $rootScope.commonTBEndY; |
6069 | + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); | |
6070 | + $scope.SetwindowStoreData(windowviewid, 'isTransparent', true); | |
6071 | + $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', false); | |
6072 | + $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', true); | |
6073 | + $scope.SetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isNormalMode')); | |
6074 | + $scope.SetwindowStoreData(windowviewid, 'IsHighlightModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isHighlight')); | |
6075 | + $('.com_' + windowviewid).remove(); | |
6076 | + $('#dot_' + windowviewid).remove(); | |
6077 | + $('#bord_' + windowviewid).remove(); | |
6078 | + $('#sppeachBubble_' + windowviewid).remove(); | |
6079 | + | |
6050 | 6080 | //Get Transparecy attributes from save CB |
6051 | 6081 | var transparencyBounds = $scope.GetwindowStoreData(windowviewid, 'transparencyBounds'); |
6052 | 6082 | $.each(transparencyBounds, function (index, value){ |
... | ... | @@ -6057,29 +6087,32 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6057 | 6087 | $scope.TransparencyEndX = value.h; |
6058 | 6088 | $scope.TransparencyBoxEndY = value.w; |
6059 | 6089 | }) |
6060 | - | |
6090 | + $scope.TBDrawStartX = $scope.GetwindowStoreData(windowviewid, 'transparencyX'); | |
6091 | + $scope.TBDrawStartY = $scope.GetwindowStoreData(windowviewid, 'transparencyY'); | |
6061 | 6092 | $scope.IncludedBodyRegions = []; |
6062 | 6093 | $scope.transparencyDrawnRegions = []; |
6063 | 6094 | $scope.canThirdBRDrawn = false; |
6064 | 6095 | |
6065 | - var tranparencyLayer; | |
6066 | - // alert($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated")+"---"+($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked"))) | |
6067 | - if ($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true && (($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked") == true || $scope.GetwindowStoreData(windowviewid, "isHighlightlBtnClicked") == true))) { | |
6068 | - tranparencyLayer = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); | |
6069 | - $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', false); | |
6070 | - $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', false); | |
6071 | - } | |
6072 | - else { | |
6073 | - var currentLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); | |
6074 | - | |
6075 | - var totalLayers = $scope.GetwindowStoreData(windowviewid, 'totalLayers'); | |
6076 | - if (currentLayer == totalLayers) { | |
6077 | - tranparencyLayer = currentLayer; | |
6078 | - } | |
6079 | - else { | |
6080 | - tranparencyLayer = currentLayer + 1; | |
6081 | - } | |
6082 | - } | |
6096 | + //var tranparencyLayer; | |
6097 | + | |
6098 | + //if ($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true && (($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked") == true || $scope.GetwindowStoreData(windowviewid, "isHighlightlBtnClicked") == true))) { | |
6099 | + // tranparencyLayer = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); | |
6100 | + // $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', false); | |
6101 | + // $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', false); | |
6102 | + //} | |
6103 | + //else if ($scope.GetwindowStoreData(windowviewid, "isTransparent") == true && $scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true) { | |
6104 | + // var tranparencyLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberTransparency'); | |
6105 | + //} | |
6106 | + //else { | |
6107 | + // var currentLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); | |
6108 | + // var totalLayers = $scope.GetwindowStoreData(windowviewid, 'totalLayers'); | |
6109 | + // if (currentLayer == totalLayers) { | |
6110 | + // tranparencyLayer = currentLayer; | |
6111 | + // } | |
6112 | + // else { | |
6113 | + // tranparencyLayer = currentLayer + 1; | |
6114 | + // } | |
6115 | + //} | |
6083 | 6116 | |
6084 | 6117 | var $container = document.getElementById("canvasDivDA_" + windowviewid); |
6085 | 6118 | var $selection = $('<div>').addClass('rectangle'); |
... | ... | @@ -6113,7 +6146,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6113 | 6146 | document.getElementById("canvasDivDA_" + windowviewid).appendChild(tempCanvas); |
6114 | 6147 | } |
6115 | 6148 | |
6116 | - $scope.SetwindowStoreData(windowviewid, 'layerNumber', tranparencyLayer); | |
6149 | + //$scope.SetwindowStoreData(windowviewid, 'layerNumber', tranparencyLayer); | |
6117 | 6150 | |
6118 | 6151 | var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData'); |
6119 | 6152 | |
... | ... | @@ -6274,8 +6307,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6274 | 6307 | } |
6275 | 6308 | |
6276 | 6309 | $('#transparencyScale_' + windowviewid).css('position', 'fixed') |
6277 | - $('#transparencyScale_' + windowviewid).css('top', $scope.startY) | |
6278 | - $('#transparencyScale_' + windowviewid).css('left', $scope.startX) | |
6310 | + $('#transparencyScale_' + windowviewid).css('top', $scope.TransparencyBoxEndY - $scope.startY);//$scope.startY $scope.TBDrawStartY | |
6311 | + $('#transparencyScale_' + windowviewid).css('left', $scope.TransparencyEndX - $scope.startX) | |
6279 | 6312 | $('#transparencyScale_' + windowviewid).css('visibility', 'visible') |
6280 | 6313 | $('#transparencyScale_' + windowviewid).css("z-index", "100000") //Dated:16-07-2016 Issue#4962:Transparency box should be on top. |
6281 | 6314 | $('#transparencyScale_' + windowviewid).draggable({ containment: '#canvasDivDA_' + windowviewid, drag: function (evt) { } }); |
... | ... | @@ -6424,6 +6457,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6424 | 6457 | $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', false); |
6425 | 6458 | $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', false); |
6426 | 6459 | } |
6460 | + else if ($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true && $scope.GetwindowStoreData(windowviewid, "isTransparent") == true) { | |
6461 | + tranparencyLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberTransparency'); | |
6462 | + } | |
6427 | 6463 | else{ |
6428 | 6464 | var currentLayer = $scope.GetwindowStoreData(windowviewid,'layerNumberBeforeTBDraw'); |
6429 | 6465 | |
... | ... | @@ -6436,11 +6472,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6436 | 6472 | } |
6437 | 6473 | } |
6438 | 6474 | $scope.SetwindowStoreData(windowviewid,'layerNumber',tranparencyLayer); |
6439 | - | |
6475 | + | |
6440 | 6476 | } |
6441 | 6477 | |
6442 | 6478 | $('#txtLayerNumberDA_' + windowviewid).val( $scope.GetwindowStoreData(windowviewid,'layerNumber')); |
6443 | - | |
6479 | + $scope.SetwindowStoreData(windowviewid, 'isTransparent', true); | |
6480 | + $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', tranparencyLayer); | |
6444 | 6481 | |
6445 | 6482 | var tranparencyImgSrc; |
6446 | 6483 | var tranparencyMaskImgSrc; |
... | ... | @@ -8169,6 +8206,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8169 | 8206 | |
8170 | 8207 | // $rootScope.switchCanvas(); |
8171 | 8208 | //To enable extract button |
8209 | + $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0); | |
8210 | + //$scope.SetwindowStoreData(windowviewid, 'isTransparent', false); | |
8172 | 8211 | $scope.SetwindowStoreData(windowviewid,'isTransparencyActivated',false); |
8173 | 8212 | // $rootScope.isTransparencyActivated = false; |
8174 | 8213 | $("#btnExtract_" + windowviewid).removeClass("disabled"); |
... | ... | @@ -8209,8 +8248,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8209 | 8248 | elements[0].parentNode.removeChild(elements[0]); |
8210 | 8249 | } |
8211 | 8250 | var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); |
8212 | - var currentlayer=$scope.GetwindowStoreData(windowviewid,'currentLayerNumber'); | |
8251 | + var currentlayer = $scope.GetwindowStoreData(windowviewid, 'currentLayerNumber'); | |
8213 | 8252 | |
8253 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent')) { | |
8254 | + currentlayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); | |
8255 | + } | |
8214 | 8256 | var sliderVal = parseInt(totalayer) - parseInt(currentlayer); |
8215 | 8257 | |
8216 | 8258 | console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + totalayer + ' - $rootScope.currentLayerNumber: ' + currentlayer + ' = set value for layerChangeSlider: ' + sliderVal); |
... | ... | @@ -8219,6 +8261,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8219 | 8261 | |
8220 | 8262 | $('#txtLayerNumberDA_' + windowviewid).val(parseInt(currentlayer)); |
8221 | 8263 | |
8264 | + $scope.SetwindowStoreData(windowviewid, 'isTransparent', false); | |
8222 | 8265 | |
8223 | 8266 | if (document.getElementById('tempCanvas_' + windowviewid) != null) { |
8224 | 8267 | $('#tempCanvas_' + windowviewid).remove(); |
... | ... | @@ -8850,14 +8893,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8850 | 8893 | $scope.SetwindowStoreData(windowviewid,'isGlobalSettingChanged',false); |
8851 | 8894 | } |
8852 | 8895 | |
8853 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated')) { | |
8896 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated') && $scope.GetwindowStoreData(windowviewid, 'isTransparent')) { | |
8854 | 8897 | |
8855 | 8898 | // $scope.CloseTransparencyBox(windowviewid); |
8856 | 8899 | $scope.GetwindowStoreData(windowviewid, 'isHighLight', true); |
8900 | + //Added Code by sandy to create Draw transparencybox autometically for save CB | |
8901 | + //$scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
8902 | + //$timeout(function () { | |
8857 | 8903 | |
8858 | - $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
8859 | - | |
8860 | - $scope.setOriginalDataAndChangeTransparency(windowviewid); | |
8904 | + $scope.setOriginalDataAndChangeTransparency(windowviewid); | |
8905 | + //}, 300); | |
8906 | + // finish CB window load | |
8907 | + $rootScope.DAWindowLoadComplete = true; | |
8861 | 8908 | |
8862 | 8909 | } |
8863 | 8910 | else { |
... | ... | @@ -8869,6 +8916,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8869 | 8916 | } |
8870 | 8917 | $scope.Normal = ""; |
8871 | 8918 | $scope.Extract = ""; |
8919 | + | |
8872 | 8920 | $scope.Highlight = "LeftButtonsDefaultState"; |
8873 | 8921 | $('#btnTranparency_' + windowviewid).removeAttr('disabled', 'disabled'); |
8874 | 8922 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... | ... | @@ -309,7 +309,8 @@ AIA.service('ModuleService', function ($http, DataService) { |
309 | 309 | |
310 | 310 | transparencyBounds: windowData.transparencyBounds, |
311 | 311 | transparencyX: windowData.transparencyX, |
312 | - transparencyY: windowData.transparencyY | |
312 | + transparencyY: windowData.transparencyY, | |
313 | + layerNumberBeforeTBDraw: windowData.layerNumberBeforeTBDraw | |
313 | 314 | |
314 | 315 | }); |
315 | 316 | } | ... | ... |