last changes before BREAKING some shit|

This commit is contained in:
Michael Murtaugh
2019-07-08 20:28:06 +02:00
parent 86ca425af0
commit 2f23dd9b46
6 changed files with 87 additions and 39 deletions

13
dist/index.js vendored
View File

@@ -4,6 +4,7 @@
// document.getElementById("debug"));
var svg = document.querySelector("#svg"),
page = document.querySelector("#page"),
iframe = document.querySelector("iframe#wikiframe"),
cats = document.querySelector("#cats"),
cats_contents = document.querySelector("#cats .body"),
@@ -24,9 +25,14 @@ function resize() {
g = d.getElementsByTagName('body')[0],
x = w.innerWidth || e.clientWidth || g.clientWidth,
y = w.innerHeight|| e.clientHeight|| g.clientHeight;
svg.setAttribute("width", x);
svg.setAttribute("height", y);
// svg.setAttribute("width", x);
// svg.setAttribute("height", y);
//console.log("resize", x, y);
// Match size of parent
svg.setAttribute("width", page.clientWidth);
svg.setAttribute("height", page.clientHeight);
}
resize();
@@ -48,7 +54,8 @@ async function doload () {
console.log("loading map");
await map.load_json("data/sitemap.json");
// console.log("loading categories");
// await map.load_cats("cats.json", cats_contents);
// await map.load_cats("data/cats.json", cats_contents);
await map.load_legend("src/legend.json", cats_contents);
console.log("LOADED!");
loaded = true;
if (current_title) {