diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 121628c..042f8df 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -2384,12 +2384,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ searchSelectedText: $rootScope.DaWindowData[i].searchSelectedText, prevId: $rootScope.DaWindowData[i].prevId, //ActualTermnumber for chnages body image - isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated, + isTransparent: $rootScope.DaWindowData[i].isTransparent, transparencyBounds: $rootScope.DaWindowData[i].transparencyBounds, transparencyValue: $rootScope.DaWindowData[i].transNumber, layerNumberTransparency: $rootScope.DaWindowData[i].layerNumberTransparency, transparencyX: $rootScope.DaWindowData[i].transparencyX, - transparencyY: $rootScope.DaWindowData[i].transparencyY + transparencyY: $rootScope.DaWindowData[i].transparencyY, + layerNumberBeforeTBDraw: $rootScope.DaWindowData[i].layerNumberBeforeTBDraw + }); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index c5224dd..cb39e1d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -153,7 +153,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l 'layerNumberTransparency': 0, 'transparencyValue': 0, 'transparencyX': 0, - 'transparencyY': 0 + 'transparencyY': 0, + 'isTransparent': false }); @@ -260,7 +261,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l 'layerNumberTransparency': 0, 'transparencyValue': 0, 'transparencyX': 0, - 'transparencyY': 0 + 'transparencyY': 0, + 'isTransparent': false }); } @@ -768,7 +770,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'minimised', isMinimize); $scope.SetwindowStoreData(windowviewid, 'moduleName', "DISSECTIBLE_ANATOMY"); $scope.SetwindowStoreData(windowviewid, 'mode', $scope.daOpenInOtherModules.mode); - $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', $scope.daOpenInOtherModules.isTransparent); + //$scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', $scope.daOpenInOtherModules.isTransparent); + $scope.SetwindowStoreData(windowviewid, 'isTransparent', $scope.daOpenInOtherModules.isTransparent); if ($scope.daOpenInOtherModules.transparencyBounds != undefined) { $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', $scope.daOpenInOtherModules.transparencyBounds); } @@ -778,9 +781,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'transparencyY', $scope.daOpenInOtherModules.transparencyY); $scope.SetwindowStoreData(windowviewid, 'transNumber', $scope.daOpenInOtherModules.transparencyValue) if ($scope.daOpenInOtherModules.transparencyValue == 0.5) { - $scope.SetwindowStoreData(windowviewid, 'transNumber', 50); + $scope.SetwindowStoreData(windowviewid, 'transNumber', 100); + } + $scope.SetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw', $scope.daOpenInOtherModules.layerNumberBeforeTBDraw); + if ($scope.daOpenInOtherModules.isTransparent) { + $scope.SetwindowStoreData(windowviewid, 'layerNumber', $scope.daOpenInOtherModules.layerNumberBeforeTBDraw); } - $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', '')); @@ -1151,6 +1157,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l scope.LayerChange(windviewid); $("#annotationpaintbrushsize").removeClass("activebtncolor"); $("#annotationpainteraser").removeClass("activebtncolor"); + + if ($scope.GetwindowStoreData(windviewid, 'isTransparent')) { + $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', slideVal); + } //else { $scope.SetwindowStoreData(windowviewid, 'currentLayerNumber', slideVal); } }); }, @@ -3346,6 +3356,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.EnableUI(); } + //Added Code by sandy to create Draw transparencybox autometically for save CB + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { + $scope.CalculateDimensionsAndDrawTBox(windowviewid); + //$scope.setOriginalDataAndChangeTransparency(windowviewid); + // finish CB window load + $rootScope.DAWindowLoadComplete = true; + + } + } } @@ -5648,7 +5667,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //to prevent screen scroll on ipad while drawing TB e.preventDefault(); - + //$scope.SetwindowStoreData(windowviewid, 'isTransparent', true); $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', false); $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', true); $scope.SetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isNormalMode')); @@ -5954,9 +5973,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#transparencyScale_' + windowviewid).draggable({ containment: '#canvasDivDA_' + windowviewid }); $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', transparencyBounds); - $scope.SetwindowStoreData(windowviewid, 'transparencyValue', 0); - $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0); - $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.TBDrawStart); + //$scope.SetwindowStoreData(windowviewid, 'transparencyValue', 0); + //$scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0); + $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.TBDrawStartX); $scope.SetwindowStoreData(windowviewid, 'transparencyY', $scope.TBDrawStartY ); } $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 10) @@ -6047,6 +6066,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //$scope.TransparencyBoxStartY = $rootScope.CommonTBSartY; //$scope.TransparencyEndX = $rootScope.commonTBEndX; //$scope.TransparencyBoxEndY = $rootScope.commonTBEndY; + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); + $scope.SetwindowStoreData(windowviewid, 'isTransparent', true); + $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', false); + $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', true); + $scope.SetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isNormalMode')); + $scope.SetwindowStoreData(windowviewid, 'IsHighlightModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isHighlight')); + $('.com_' + windowviewid).remove(); + $('#dot_' + windowviewid).remove(); + $('#bord_' + windowviewid).remove(); + $('#sppeachBubble_' + windowviewid).remove(); + //Get Transparecy attributes from save CB var transparencyBounds = $scope.GetwindowStoreData(windowviewid, 'transparencyBounds'); $.each(transparencyBounds, function (index, value){ @@ -6057,29 +6087,32 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.TransparencyEndX = value.h; $scope.TransparencyBoxEndY = value.w; }) - + $scope.TBDrawStartX = $scope.GetwindowStoreData(windowviewid, 'transparencyX'); + $scope.TBDrawStartY = $scope.GetwindowStoreData(windowviewid, 'transparencyY'); $scope.IncludedBodyRegions = []; $scope.transparencyDrawnRegions = []; $scope.canThirdBRDrawn = false; - var tranparencyLayer; - // alert($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated")+"---"+($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked"))) - if ($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true && (($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked") == true || $scope.GetwindowStoreData(windowviewid, "isHighlightlBtnClicked") == true))) { - tranparencyLayer = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); - $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', false); - $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', false); - } - else { - var currentLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); - - var totalLayers = $scope.GetwindowStoreData(windowviewid, 'totalLayers'); - if (currentLayer == totalLayers) { - tranparencyLayer = currentLayer; - } - else { - tranparencyLayer = currentLayer + 1; - } - } + //var tranparencyLayer; + + //if ($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true && (($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked") == true || $scope.GetwindowStoreData(windowviewid, "isHighlightlBtnClicked") == true))) { + // tranparencyLayer = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); + // $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', false); + // $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', false); + //} + //else if ($scope.GetwindowStoreData(windowviewid, "isTransparent") == true && $scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true) { + // var tranparencyLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberTransparency'); + //} + //else { + // var currentLayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); + // var totalLayers = $scope.GetwindowStoreData(windowviewid, 'totalLayers'); + // if (currentLayer == totalLayers) { + // tranparencyLayer = currentLayer; + // } + // else { + // tranparencyLayer = currentLayer + 1; + // } + //} var $container = document.getElementById("canvasDivDA_" + windowviewid); var $selection = $('