diff --git a/index.html b/index.html index e526e0386012bcec6d638b636b9e06e073a99cf5..c7ea1c8f2f045105cdb010e643375edbed6afb5a 100644 --- a/index.html +++ b/index.html @@ -331,6 +331,18 @@ function hide_ntc_description(ntc) { setTimeout(() => descElem.remove(), 222); } +/* + * Shows initial fragment on A- B- Z- tag + * + * @param {string} ntc - NtC code of the fragment + * @param {string} seq - Sequence of the fragment + */ +function show_initial_fragment(ntc, seq) { + const fragElem = document.getElementById(fragment_cell_id(mkFragId(ntc, seq), 'abz')); + + abz_fragment_clicked(fragElem, ntc, seq); +} + /* * Displays a "tooltip" element with NtC description * @@ -824,10 +836,12 @@ function init_all() { clearInterval(anim); viewerElem.removeChild(loadingElem); - redraw_molstar(); + show_initial_fragment('BB00', 'C_G'); }).catch(e => { clearInterval(anim); - viewerElem.removeChild(loadingElem); + if (viewerElem.contains(loadingElem)) { + viewerElem.removeChild(loadingElem); + } throw e; });