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) {
|
||||
return function (config, router) {
|
||||
var self = this
|
||||
var fanout = new DataDistributor()
|
||||
var content
|
||||
var contentDiv
|
||||
|
||||
|
@ -17,6 +16,10 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
|||
var buttons = document.createElement("div")
|
||||
buttons.classList.add("buttons")
|
||||
|
||||
var fanout = new DataDistributor()
|
||||
var fanoutUnfiltered = new DataDistributor()
|
||||
fanoutUnfiltered.add(fanout)
|
||||
|
||||
function removeContent() {
|
||||
if (!content)
|
||||
return
|
||||
|
@ -79,9 +82,9 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
|||
var statistics = new Proportions(config, fanout)
|
||||
var about = new About()
|
||||
|
||||
fanout.add(meshstats)
|
||||
fanout.add(newnodeslist)
|
||||
fanout.add(lostnodeslist)
|
||||
fanoutUnfiltered.add(meshstats)
|
||||
fanoutUnfiltered.add(newnodeslist)
|
||||
fanoutUnfiltered.add(lostnodeslist)
|
||||
fanout.add(nodelist)
|
||||
fanout.add(linklist)
|
||||
fanout.add(statistics)
|
||||
|
@ -112,7 +115,7 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
|||
|
||||
router.view("m")
|
||||
|
||||
self.setData = fanout.setData
|
||||
self.setData = fanoutUnfiltered.setData
|
||||
|
||||
return self
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue