merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
423 stars 144 forks source link

"default" as the default value for states #258

Closed meren closed 8 years ago

meren commented 8 years ago

Hi,

I am planning to change the interface code in such a way that if there is a state stored in the profile database with the name "default", it will be automatically loaded and the tree will be drawn without requiring the "Draw" button to be clicked.

This will be particularly handy when we have projects that are publicly shared (you will get an e-mail, you will click to see what your colleague did, and it will be drawn automatically if there is a default state stored, etc).

So, it would be very helpful to have a default value ("default") for the save state name input box (id="saveState_name" in anvio/data/interactive/index.html line 479) in the modal window. But adding value="default" did not do it, hence here I am :/

Thanks in advance :)

ozcan commented 8 years ago

Hi Meren,

Your method does not work because onChange event of the state list overwrites name input, But i changed the behavior of the save state window as you described. Now first it tries to select "current_state_name" on the list, if it fails, puts "default" to name input.

Best, Özcan

meren commented 8 years ago

All those interweb codes confuses me. That updates that, this trigger this ;) Thank you!