From c5bba583d5cea4c6a24e40511ee7828e20256a17 Mon Sep 17 00:00:00 2001 From: Boris Kovar Date: Tue, 10 Dec 2024 08:13:00 +0100 Subject: [PATCH] #1603 - fixes --- js/components/preview/molecule/redux/dispatchActions.js | 6 ++++-- js/reducers/ngl/useDisplayDensityLHS.js | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/js/components/preview/molecule/redux/dispatchActions.js b/js/components/preview/molecule/redux/dispatchActions.js index ac0044287..dea61ad40 100644 --- a/js/components/preview/molecule/redux/dispatchActions.js +++ b/js/components/preview/molecule/redux/dispatchActions.js @@ -296,7 +296,8 @@ const setDensity = ( id: data.id, display: true, representations: representations, - isWireframeStyle: isWireframeStyle + isWireframeStyle: isWireframeStyle, + densityData: data.proteinData }) ); }; @@ -376,7 +377,8 @@ const setDensityCustom = ( id: data.id, display: true, representations: representations, - isWireframeStyle: isWireframeStyle + isWireframeStyle: isWireframeStyle, + densityData: data.proteinData }) ); }; diff --git a/js/reducers/ngl/useDisplayDensityLHS.js b/js/reducers/ngl/useDisplayDensityLHS.js index 1b14e10fc..12462a622 100644 --- a/js/reducers/ngl/useDisplayDensityLHS.js +++ b/js/reducers/ngl/useDisplayDensityLHS.js @@ -49,6 +49,8 @@ export const useDisplayDensityLHS = () => { await dispatch(getDensityMapData(data)); } + data.proteinData = densityData.densityData; + const prepParams = dispatch(getDensityChangedParams(densityData.isWireframeStyle)); const densityObject = generateDensityObject(data, colourToggle, base_url, densityData.isWireframeStyle); const combinedObject = { ...prepParams, ...densityObject }; @@ -106,6 +108,8 @@ export const useDisplayDensityLHS = () => { await dispatch(getDensityMapData(data)); } + data.proteinData = densityData.densityData; + let densityObject = dispatch(getDensityChangedParams()); densityObject = dispatch(toggleDensityWireframe(densityData.isWireframeStyle, densityObject)); const oldDensityData = dispatch(deleteDensityObject(data, colourToggle, stage, !densityData.isWireframeStyle));