Skip to content

Commit

Permalink
- #1483 - removed old code
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Nov 18, 2024
1 parent ecc1bfc commit dfd16da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion js/components/datasets/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,22 @@ 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 @@ -120,7 +120,7 @@ export const ProjectHistory = memo(({ showFullHistory, graphKey, expanded, onExp
setTryToOpen(false);
dispatch(changeSnapshot(sessionProjectID, transitionToSnapshot.hash));
} else if (!isSnapshotDirty && tryToOpen && transitionToSnapshot) {
dispatch(changeSnapshot(sessionProjectID, transitionToSnapshot.hash));
// dispatch(changeSnapshot(sessionProjectID, transitionToSnapshot.hash, nglViewList, stage));
setTryToOpen(false);
}
}, [dispatch, isSnapshotDirty, nglViewList, sessionProjectID, stage, transitionToSnapshot, tryToOpen]);
Expand Down

0 comments on commit dfd16da

Please sign in to comment.