diff --git a/sourcing/static/js/xanaflight.js b/sourcing/static/js/xanaflight.js index 079a1b5..839a7c5 100644 --- a/sourcing/static/js/xanaflight.js +++ b/sourcing/static/js/xanaflight.js @@ -280,10 +280,10 @@ function create_bridges(link_count) { } -function fulfil(doc, index, doc_count) { +function fulfil(doc, index, doc_count, heading) { var svg_element = document.getElementById('svg'); - new_document({'heading': 'xanadoc', + new_document({'heading': heading, 'text': doc.doc, 'doctype': 'xanadoc', 'index': index, diff --git a/sourcing/templates/view/xanaflight.html b/sourcing/templates/view/xanaflight.html index 30d9367..14042e1 100644 --- a/sourcing/templates/view/xanaflight.html +++ b/sourcing/templates/view/xanaflight.html @@ -52,11 +52,14 @@ var docs = {{ docs | tojson }}; var link_count = {{ link_count | tojson }}; $(function() { - size_svg(); - $(window).resize(size_svg); - reset(); // clear all documents and bridges + size_svg(); + $(window).resize(size_svg); + reset(); // clear all documents and bridges + headings = ["FORENOTE TO KINBOTE'S COMMENTARY", + 'Canto One', + "CHARLES KINBOTE'S NOTES"]; docs.forEach((doc, index) => { - fulfil(doc, index, docs.length); + fulfil(doc, index, docs.length, headings[index]); }); create_bridges(link_count); add_handlers();