diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 431e6e3..121628c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -2339,11 +2339,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ selectedStructureID: 0,//N contentDescriptorId: 0, callOuts: $rootScope.DaWindowData[i].CurriculumTermData, - //hideAllPins: $rootScope.DaWindowData[i].isHidePinBtnClicked, + //selectedCallouts: $rootScope.DaWindowData[i].CBselectedpinCordinate, layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1, isModestyOn: $rootScope.DaWindowData[i].ModestyValue, - isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated, + isTopToolBarVisible: false, //$rootScope.DaWindowData[i].isTopToolBarVisible, clickedTermList: $rootScope.DaWindowData[i].fullTermlist, minimised: $rootScope.DaWindowData[i].minimised, @@ -2352,19 +2352,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ // vertical: $rootScope.DaWindowData[i].verticalScroll, // horizontal: $rootScope.DaWindowData[i].horizontalScroll //}, - //selectedPins: $rootScope.DaWindowData[i].clickedPins, + maximised: $rootScope.DaWindowData[i].maximised, size: { width: $rootScope.DaWindowData[i].width, height: $rootScope.DaWindowData[i].height }, - id: $rootScope.DaWindowData[i].voId, - //showSelectedPins: $rootScope.DaWindowData[i].isShowSelectedSystemPinsClicked, - // hideCallOuts: false,//N - //showAllPins: $rootScope.DaWindowData[i].isShowBodyWithCBPinData,//N - //scaleIndex: 0,//N - //bodySystemId: $rootScope.DaWindowData[i].SelectedSystemID, - //position: { x: 840, y: 263 }, + id: $rootScope.DaWindowData[i].voId, + imageId: $rootScope.DaWindowData[i].imageId, position: { top: $rootScope.DaWindowData[i].top, @@ -2377,20 +2372,24 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ //sliderVal: $rootScope.DaWindowData[i].sliderVal, zoom: $rootScope.DaWindowData[i].zoomInOut, skinId: $rootScope.DaWindowData[i].curentEthnicity, - isResizeLock: false , //.isResizeLock,//N + isResizeLock: false , //N mode: $rootScope.DaWindowData[i].mode, - windowListId: 0,//windowData.windowListId,//25 + windowListId: 0,//N canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition, canvasHScrollX: $rootScope.DaWindowData[i].CanvasDivLeftPosition, isCallOutVisible: false, - annotationData: "", // .annotationData,//24 - transparencyBounds: 0,//windowData.transparencyBounds, - isLeftToolBarVisible: false, //windowData.isLeftToolBarVisible,//N - isModuleLoaded: false, //.isModuleLoaded,//N - transparencyValue: 0,//N - layerNumberTransparency: false, //layerNumberTransparency,//N + annotationData: "", // .annotationData, + isLeftToolBarVisible: false, //N + isModuleLoaded: false, //N searchSelectedText: $rootScope.DaWindowData[i].searchSelectedText, - prevId: $rootScope.DaWindowData[i].prevId //ActualTermnumber for chnages body image + prevId: $rootScope.DaWindowData[i].prevId, //ActualTermnumber for chnages body image + + isTransparent: $rootScope.DaWindowData[i].isTransparencyActivated, + 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 }); } @@ -2416,6 +2415,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if ($scope.selectedKey.windows.window != undefined) { $scope.selectedKey.windows.window.push(arrToStrWinObj); } + else if ($scope.selectedKey.windows == "") { + $scope.selectedKey.windows = []; + $scope.selectedKey.windows.push({ 'window': [] }); + $scope.selectedKey.windows.window = []; + $scope.selectedKey.windows.window.push(arrToStrWinObj); + } + } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index d245687..c5224dd 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -148,7 +148,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l 'maximised': false, 'id': 0, 'moduleName': '', - 'mode': '' + 'mode': '', + 'transparencyBounds': [], + 'layerNumberTransparency': 0, + 'transparencyValue': 0, + 'transparencyX': 0, + 'transparencyY': 0 }); @@ -250,7 +255,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l 'maximised': false, 'id': 0, 'moduleName': '', - 'mode': '' + 'mode': '', + 'transparencyBounds': [], + 'layerNumberTransparency': 0, + 'transparencyValue': 0, + 'transparencyX': 0, + 'transparencyY': 0 }); } @@ -758,6 +768,19 @@ 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); + if ($scope.daOpenInOtherModules.transparencyBounds != undefined) { + $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', $scope.daOpenInOtherModules.transparencyBounds); + } + $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', $scope.daOpenInOtherModules.layerNumberTransparency); + //$scope.SetwindowStoreData(windowviewid, 'transparencyValue', $scope.daOpenInOtherModules.transparencyValue); + $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.daOpenInOtherModules.transparencyX); + $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,'parentSlugName',($location.url()).replace('/', '')); @@ -1080,7 +1103,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $(".containment-wrapper-"+windowviewid).css("min-width", "auto"); } $("#transparencyScale_" + windowviewid).draggable({containment:'window'}); - $("#draggable_"+windowviewid).draggable({ containment: ".containment-wrapper-"+windowviewid, scroll: false }); + $("#draggable_" + windowviewid).draggable({ containment: ".containment-wrapper-" + windowviewid, scroll: false }); } @@ -1137,11 +1160,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.TbSelSlider = function (windowviewid) { - + var sliderValue = 50; + var tbValue = $scope.GetwindowStoreData(windowviewid, 'transNumber'); + if (tbValue != undefined) { + sliderValue = tbValue; + } $("#tbSlider_" + windowviewid).slider({ min: 0, max: 100, - value: 50, + value: sliderValue, range: "min", orientation: "horizontal", // change: function (event, ui) { @@ -5540,6 +5567,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $selection.appendTo($container); } + //$rootScope.commonTBStartX = actulalX; + //$rootScope.CommonTBSartY = actualY; + //$rootScope.SliderStartX = $scope.TBDrawStartX; + //$rootScope.SliderStartY = $scope.TBDrawStartY; + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousedown", mouseDownListener); document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchstart", mouseDownListener); @@ -5618,7 +5650,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l e.preventDefault(); $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')); @@ -5650,6 +5682,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.TransparencyEndX = TransparencyEndX; $scope.TransparencyBoxEndY = TransparencyBoxEndY; + //Save TranparencyBox and slider for CurriculmBuilder + //$rootScope.commonTBEndX = TransparencyEndX; + //$rootScope.commonTBEndY = TransparencyBoxEndY; + var transparencyBounds = $scope.GetwindowStoreData(windowviewid,'transparencyBounds'); + transparencyBounds.push({ + 'h': $scope.TransparencyEndX, 'x': $scope.TransparencyBoxStartX, + 'w': $scope.TransparencyBoxEndY, 'y': $scope.TransparencyBoxStartY + }); + if ($scope.TransparencyBoxStartX == $scope.TransparencyEndX && $scope.TransparencyBoxStartY == $scope.TransparencyBoxEndY) { $("#btnExtract_" + windowviewid).removeClass("disabled"); @@ -5730,7 +5771,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l TransparencyBoxEndY = new_endy; - + var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData'); $.each(BodyRegionDictionary, function (index, value) { @@ -5909,6 +5950,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // $('#transparencyScale').modal('show'); $('#transparencyScale_' + windowviewid).css('position', 'fixed'); $('#transparencyScale_' + windowviewid).draggable({ containment: 'window', scroll: false }); + if ($rootScope.isCallFromOtherModule) { + $('#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, 'transparencyY', $scope.TBDrawStartY ); + } $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 10) $('#transparencyScale_' + windowviewid).css('left', $scope.TBDrawStartX + 130) $('#transparencyScale_' + windowviewid).css('visibility', 'visible') @@ -5991,6 +6041,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.CalculateDimensionsAndDrawTBox = function (windowviewid) { + //$scope.startX = $rootScope.commonTBStartX; + //$scope.startY = $rootScope.CommonTBSartY; + //$scope.TransparencyBoxStartX = $rootScope.commonTBStartX; + //$scope.TransparencyBoxStartY = $rootScope.CommonTBSartY; + //$scope.TransparencyEndX = $rootScope.commonTBEndX; + //$scope.TransparencyBoxEndY = $rootScope.commonTBEndY; + //Get Transparecy attributes from save CB + var transparencyBounds = $scope.GetwindowStoreData(windowviewid, 'transparencyBounds'); + $.each(transparencyBounds, function (index, value){ + $scope.startX = value.x; + $scope.startY = value.y + $scope.TransparencyBoxStartX = value.x; + $scope.TransparencyBoxStartY = value.y; + $scope.TransparencyEndX = value.h; + $scope.TransparencyBoxEndY = value.w; + }) + + $scope.IncludedBodyRegions = []; + $scope.transparencyDrawnRegions = []; + $scope.canThirdBRDrawn = false; var tranparencyLayer; // alert($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated")+"---"+($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked"))) @@ -6010,6 +6080,39 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l tranparencyLayer = currentLayer + 1; } } + + var $container = document.getElementById("canvasDivDA_" + windowviewid); + var $selection = $('