Set filename according to molecule name if available

This commit is contained in:
Saul Johnson
2017-08-14 17:15:15 +01:00
parent 8e49dba577
commit 7e38981391
+1
View File
@@ -119,6 +119,7 @@ $(document).ready ->
url = buildUrl screenWidth, screenHeight, foregroundColor, backgroundColor, currentCompoundName
if smilesMode
url = buildSmilesUrl screenWidth, screenHeight, foregroundColor, backgroundColor, currentCompoundSmiles
downloadButton.attr 'download', if smilesMode then 'smiles_molecule' else currentCompoundName
downloadButton.attr 'href', url
# Updates the displayed preview.