Skip to content

Commit

Permalink
#267 activate auto center ligand position in NGL viewer of compound s…
Browse files Browse the repository at this point in the history
…ets's molecules
  • Loading branch information
tibor-postek-m2ms committed May 12, 2020
1 parent 25ed693 commit c140ffe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/components/datasets/datasetMoleculeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ const DatasetMoleculeView = memo(({ imageHeight, imageWidth, data, datasetID })
const current_style = isLigandOn || isProteinOn || isComplexOn || isSurfaceOn ? selected_style : not_selected_style;

const addNewLigand = () => {
console.log(data);
dispatch(addLigand(stage, data, colourToggle, datasetID));
};

Expand Down
2 changes: 1 addition & 1 deletion js/components/datasets/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const addLigand = (stage, data, colourToggle, datasetID) => dispatch => {
Object.assign({ display_div: VIEWS.MAJOR_VIEW }, generateMoleculeObject(data, colourToggle)),
stage,
undefined,
null
undefined
)
).finally(() => {
const currentOrientation = stage.viewerControls.getOrientation();
Expand Down
2 changes: 1 addition & 1 deletion js/components/nglView/generatingObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const generateCompoundMolObject = (sdf_info, identifier) => ({

// Ligand
export const generateMoleculeObject = (data, colourToggle) => ({
name: data.protein_code + '_LIGAND',
name: data.protein_code || data.name + '_LIGAND',
OBJECT_TYPE: OBJECT_TYPE.MOLECULE,
colour: colourToggle,
sdf_info: data.sdf_info,
Expand Down

0 comments on commit c140ffe

Please sign in to comment.