Skip to content

Commit

Permalink
- #1483 - state based rendering is now done
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Nov 18, 2024
1 parent dfd16da commit 228973f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 1 addition & 16 deletions js/components/datasets/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,22 +204,7 @@ export const addDatasetLigand = (
representations: representations,
datasetID: datasetID
})
).finally(() => {
const skipOrientation = false; //state.trackingReducers.skipOrientationChange;
if (!skipOrientation) {
const ligandOrientation = stage.viewerControls.getOrientation();
dispatch(setOrientation(VIEWS.MAJOR_VIEW, ligandOrientation));

dispatch(appendMoleculeOrientation(getDatasetMoleculeID(datasetID, data?.id), ligandOrientation));

// keep current orientation of NGL View
if (!skipOrientation) {
console.count(`Before applying orientation after loading dataset ligand.`);
stage.viewerControls.orient(currentOrientation);
console.count(`After applying orientation after loading dataset ligand.`);
}
}
});
);
};

export const removeDatasetLigand = (stage, data, colourToggle, datasetID, skipTracking = false) => dispatch => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ const MoleculeView = memo(
const tagTypeObject = getTagType(tagCategory);
const tagLabel =
tagCategory === 'ConformerSites'
? tagTypeObject.tag_prefix.replace(getTagType('CanonSites')?.tag_prefix, '')
? tagTypeObject?.tag_prefix.replace(getTagType('CanonSites')?.tag_prefix, '')
: tagTypeObject?.tag_prefix;
return (
<Tooltip
Expand Down

0 comments on commit 228973f

Please sign in to comment.