diff --git a/lib/main.js b/lib/main.js index 1c2a3c0..5e05028 100644 --- a/lib/main.js +++ b/lib/main.js @@ -15,7 +15,7 @@ function (Map, Sidebar, Meshstats, Linklist, SimpleNodelist, Infobox) { var infobox = new Infobox(config, sidebar, gotoAnything) gotoAnything.addTarget(infobox) - var map = new Map(sidebar, gotoAnything) + var map = new Map(linkScale, sidebar, gotoAnything) document.body.insertBefore(map.div, document.body.firstChild) gotoAnything.addTarget(map) @@ -36,11 +36,11 @@ function (Map, Sidebar, Meshstats, Linklist, SimpleNodelist, Infobox) { ] var p = Promise.all(urls.map(getJSON)) - p.then(handle_data(config, linkScale, sidebar, meshstats, linklist, newnodeslist, lostnodeslist, infobox, map, gotoAnything)) + p.then(handle_data(sidebar, meshstats, linklist, newnodeslist, lostnodeslist, infobox, map, gotoAnything)) }) } - function handle_data(config, linkScale, sidebar, meshstats, linklist, newnodeslist, lostnodeslist, infobox, map, gotoAnything) { + function handle_data(sidebar, meshstats, linklist, newnodeslist, lostnodeslist, infobox, map, gotoAnything) { return function (data) { var nodedict = data[0] var nodes = Object.keys(nodedict.nodes).map(function (key) { return nodedict.nodes[key] }) @@ -106,7 +106,7 @@ function (Map, Sidebar, Meshstats, Linklist, SimpleNodelist, Infobox) { d.target.node.neighbours.push({ node: d.source.node, link: d }) }) - map.setData(linkScale, now, newnodes, lostnodes, onlinenodes, links) + map.setData(now, newnodes, lostnodes, onlinenodes, links) meshstats.setData(nodes) linklist.setData(links) newnodeslist.setData(newnodes) diff --git a/lib/map.js b/lib/map.js index f8d431c..161ff70 100644 --- a/lib/map.js +++ b/lib/map.js @@ -55,7 +55,7 @@ define(function () { var groupOnline, group - return function (sidebar, gotoAnything) { + return function (linkScale, sidebar, gotoAnything) { var self = this var el = document.createElement("div") @@ -76,7 +76,7 @@ define(function () { var nodeDict = {} var linkDict = {} - self.setData = function (linkScale, now, newnodes, lostnodes, onlinenodes, links) { + self.setData = function (now, newnodes, lostnodes, onlinenodes, links) { nodeDict = {} linkDict = {}