last changes before BREAKING some shit|
This commit is contained in:
13
dist/index.js
vendored
13
dist/index.js
vendored
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user