This commit is contained in:
Azgaar 2019-10-24 22:27:41 +03:00
parent 2ba1332eec
commit a3fa5443d6
16 changed files with 137 additions and 113 deletions

View file

@ -360,6 +360,7 @@ function editReligions() {
// build hierarchy tree
pack.religions[0].origin = null;
const religions = pack.religions.filter(r => !r.removed);
if (religions.length < 3) {tip("Not enough religions to show hierarchy", false, "error"); return;}
const root = d3.stratify().id(d => d.i).parentId(d => d.origin)(religions);
const treeWidth = root.leaves().length;
const treeHeight = root.height;