gui: use two datadistributors, one for filtered data
This commit is contained in:
parent
653a329698
commit
8f634b4ba2
13
lib/gui.js
13
lib/gui.js
|
@ -7,7 +7,6 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
||||||
Title, About, DataDistributor, FilterGUI) {
|
Title, About, DataDistributor, FilterGUI) {
|
||||||
return function (config, router) {
|
return function (config, router) {
|
||||||
var self = this
|
var self = this
|
||||||
var fanout = new DataDistributor()
|
|
||||||
var content
|
var content
|
||||||
var contentDiv
|
var contentDiv
|
||||||
|
|
||||||
|
@ -17,6 +16,10 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
||||||
var buttons = document.createElement("div")
|
var buttons = document.createElement("div")
|
||||||
buttons.classList.add("buttons")
|
buttons.classList.add("buttons")
|
||||||
|
|
||||||
|
var fanout = new DataDistributor()
|
||||||
|
var fanoutUnfiltered = new DataDistributor()
|
||||||
|
fanoutUnfiltered.add(fanout)
|
||||||
|
|
||||||
function removeContent() {
|
function removeContent() {
|
||||||
if (!content)
|
if (!content)
|
||||||
return
|
return
|
||||||
|
@ -79,9 +82,9 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
||||||
var statistics = new Proportions(config, fanout)
|
var statistics = new Proportions(config, fanout)
|
||||||
var about = new About()
|
var about = new About()
|
||||||
|
|
||||||
fanout.add(meshstats)
|
fanoutUnfiltered.add(meshstats)
|
||||||
fanout.add(newnodeslist)
|
fanoutUnfiltered.add(newnodeslist)
|
||||||
fanout.add(lostnodeslist)
|
fanoutUnfiltered.add(lostnodeslist)
|
||||||
fanout.add(nodelist)
|
fanout.add(nodelist)
|
||||||
fanout.add(linklist)
|
fanout.add(linklist)
|
||||||
fanout.add(statistics)
|
fanout.add(statistics)
|
||||||
|
@ -112,7 +115,7 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
||||||
|
|
||||||
router.view("m")
|
router.view("m")
|
||||||
|
|
||||||
self.setData = fanout.setData
|
self.setData = fanoutUnfiltered.setData
|
||||||
|
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue