From 8f634b4ba2b2c2ebb3d6337ad3df1270e7fd8328 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 8 Jul 2015 21:28:00 +0200 Subject: [PATCH] gui: use two datadistributors, one for filtered data --- lib/gui.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/gui.js b/lib/gui.js index 473eb84..ff52361 100644 --- a/lib/gui.js +++ b/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 }