Override xanadoc titles.

This commit is contained in:
Edward Betts 2018-12-08 17:17:20 +00:00
parent ba9adc4b26
commit 20edacc985
2 changed files with 9 additions and 6 deletions

View file

@ -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'); var svg_element = document.getElementById('svg');
new_document({'heading': 'xanadoc', new_document({'heading': heading,
'text': doc.doc, 'text': doc.doc,
'doctype': 'xanadoc', 'doctype': 'xanadoc',
'index': index, 'index': index,

View file

@ -55,8 +55,11 @@ $(function() {
size_svg(); size_svg();
$(window).resize(size_svg); $(window).resize(size_svg);
reset(); // clear all documents and bridges reset(); // clear all documents and bridges
headings = ["FORENOTE TO KINBOTE'S COMMENTARY",
'Canto One',
"CHARLES KINBOTE'S NOTES"];
docs.forEach((doc, index) => { docs.forEach((doc, index) => {
fulfil(doc, index, docs.length); fulfil(doc, index, docs.length, headings[index]);
}); });
create_bridges(link_count); create_bridges(link_count);
add_handlers(); add_handlers();