From 0cb9569c59733f79bcb783f7eb07e8e5dd70c7cc Mon Sep 17 00:00:00 2001 From: Matej Vavrek Date: Fri, 3 Apr 2020 18:08:26 +0200 Subject: [PATCH] #235 added tooltips for toggle buttons #227 added _ligand suffix --- js/components/nglView/generatingObjects.js | 2 +- .../preview/molecule/moleculeList.js | 218 ++++++++++-------- .../preview/molecule/moleculeView.js | 218 ++++++++++-------- .../preview/molecule/molecules_helpers.js | 2 +- 4 files changed, 234 insertions(+), 206 deletions(-) diff --git a/js/components/nglView/generatingObjects.js b/js/components/nglView/generatingObjects.js index cf42d5620..b4b13c327 100644 --- a/js/components/nglView/generatingObjects.js +++ b/js/components/nglView/generatingObjects.js @@ -46,7 +46,7 @@ export const generateCompoundMolObject = (sdf_info, identifier) => ({ // Ligand export const generateMoleculeObject = (data, colourToggle) => ({ - name: OBJECT_TYPE.MOLECULE + '_' + data.id.toString(), + name: OBJECT_TYPE.MOLECULE + '_' + data.id.toString() + '_LIGAND', OBJECT_TYPE: OBJECT_TYPE.MOLECULE, colour: colourToggle, sdf_info: data.sdf_info, diff --git a/js/components/preview/molecule/moleculeList.js b/js/components/preview/molecule/moleculeList.js index ffdd4f801..5a992d2f0 100644 --- a/js/components/preview/molecule/moleculeList.js +++ b/js/components/preview/molecule/moleculeList.js @@ -532,109 +532,123 @@ const MoleculeList = memo( wrap="nowrap" className={classes.contButtonsMargin} > - - - - - - - - - - - {/* C stands for contacts now */} - - - - - - - {/* TODO waiting for backend data */} - - - - - + onButtonToggle('ligand', true); + onButtonToggle('protein', true); + onButtonToggle('complex', true); + onButtonToggle('surface', true); + // onDensity(true); + // onVector(true); + }} + disabled={disableUserInteraction} + > + A + + + + + + + + + + + + + + + + {/* C stands for contacts now */} + + + + + + + + + + + {/* TODO waiting for backend data */} + + + + + + + + )} diff --git a/js/components/preview/molecule/moleculeView.js b/js/components/preview/molecule/moleculeView.js index abb53747a..7bf6a5201 100644 --- a/js/components/preview/molecule/moleculeView.js +++ b/js/components/preview/molecule/moleculeView.js @@ -477,108 +477,122 @@ const MoleculeView = memo(({ imageHeight, imageWidth, data }) => { wrap="nowrap" className={classes.contButtonsMargin} > - - - - - - - - - - - {/* C stands for contacts now */} - - - - - - - {/* TODO waiting for backend data */} - - - - - + + + + + + + + + + + + + + + + + + {/* C stands for contacts now */} + + + + + + + + + + + {/* TODO waiting for backend data */} + + + + + + + + diff --git a/js/components/preview/molecule/molecules_helpers.js b/js/components/preview/molecule/molecules_helpers.js index 6d18b3f93..cb9250a93 100644 --- a/js/components/preview/molecule/molecules_helpers.js +++ b/js/components/preview/molecule/molecules_helpers.js @@ -2,7 +2,7 @@ import { OBJECT_TYPE } from '../../nglView/constants'; export const generateMolecule = (id, sdf_info) => { return { - name: OBJECT_TYPE.MOLECULE + '_' + id, + name: OBJECT_TYPE.MOLECULE + '_' + id + '_LIGAND', OBJECT_TYPE: OBJECT_TYPE.MOLECULE, colour: '#FFFFFF', sdf_info: sdf_info