3D-e-Chem / molviewer-tsx

Visualize protein with it's natural ligand and candidates
Apache License 2.0
2 stars 1 forks source link

Prepare for multiple viewers #3

Closed sverhoeven closed 7 years ago

sverhoeven commented 7 years ago

Use react-router to select viewers.

The current single viewer should have /LigandsAndProteinsViewer as url. When no viewer is passed in url then give a not found error.

The SERVER_MODEL_CHANGED saga is hardcoded for the current viewer. Other viewers will want to overwrite the saga with their own functionality. See https://github.com/yelouafi/redux-saga/issues/76 for a possible solution

sverhoeven commented 7 years ago

Change viewer url to /ligands-and-proteins", other viewers should also use kebab case.

sverhoeven commented 7 years ago

There also is /pharmacophores route now.

We switched from redux-saga to redux-observable, in https://github.com/3D-e-Chem/molviewer-tsx/blob/master/src/sse/epic.ts use switch handle SERVER_MODEL_CHANGED action for each route.