diff --git a/index.html b/index.html index 77795cc..4b5505d 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,7 @@

- +
diff --git a/tetra-listing.js b/tetra-listing.js index 5e3d9cd..05ba1d2 100644 --- a/tetra-listing.js +++ b/tetra-listing.js @@ -5,30 +5,28 @@ let selectedRow; const table = document.getElementById( "partsTable" ); const tbody = table.createTBody(); for (const tetra of models) { - const id = tetra.id; - const url = tetra.url; - const chiral = (tetra.chiral === "true"); const tr = tbody.insertRow(); fillRow(tr, tetra); - tr.addEventListener("click", - function (event) { - if(url) { - switchModel(url); - } else { - alert("Tetrahedron #" + id + " is not available.\n\nPlease help us collect the full set."); - } - if ( selectedRow ) selectedRow.className = ""; - selectedRow = tr; - selectedRow.className = "selected"; - const index = document.getElementById( "index" ); - index.textContent = id; - } - ); + tr.addEventListener("click", () => selectTetra( tetra, tr ) ); +} +selectTetra( models[ 0 ], tbody .rows[ 0 ] ); + +function selectTetra( tetra, tr ) { + const { url, id } = tetra; + if(url) { + switchModel(url); + } else { + alert("Tetrahedron #" + id + " is not available.\n\nPlease help us collect the full set."); + } + if ( selectedRow ) selectedRow.className = ""; + selectedRow = tr; + selectedRow.className = "selected"; + const index = document.getElementById( "index" ); + index.textContent = id; } function fillRow(tr, tetra) { - const id = tetra.id; - const url = tetra.url; + const { id, url } = tetra; const chiral = (tetra.chiral === "true"); if(!tr.id) { tr.id = "tetra-" + id; diff --git a/vZomeLogo.vZome b/vZomeLogo.vZome deleted file mode 100644 index 80072a6..0000000 --- a/vZomeLogo.vZome +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is the view that I used today to generate the icon file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -