Adjust box height.

This commit is contained in:
Edward Betts 2018-12-08 13:28:10 +00:00
parent 30bd2f1dd6
commit ba9adc4b26

View file

@ -195,10 +195,13 @@ function new_document(doc) {
var h = document.documentElement.clientHeight;
if (doc.doctype == 'xanadoc') {
element.css('height', (h - 100) + 'px');
var ratio = (doc.index + 1) / (doc.doc_count + 1)
var r_index = doc.doc_count - doc.index - 1;
var x = (w * ratio - (r_index * (box_width / 2)));
var y = (h - box_height) / 2;
// var y = (h - box_height) / 2;
var y = 10;
} else {
var x = Math.random() * (w - 400);
var y = Math.random() * (h - 400);