summaryrefslogtreecommitdiff
path: root/code/weightviswrapper.js
diff options
context:
space:
mode:
Diffstat (limited to 'code/weightviswrapper.js')
-rw-r--r--code/weightviswrapper.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/code/weightviswrapper.js b/code/weightviswrapper.js
index eec2a84..ad33092 100644
--- a/code/weightviswrapper.js
+++ b/code/weightviswrapper.js
@@ -1,3 +1,4 @@
+// TODO rename classes (weightVis etc.)
var WeightVisWrapper = (function() {
var attributeNames =
["CRIM", "ZN", "INDUS", "CHAS", "NOX", "RM", "AGE", "DIS", "RAD", "TAX", "PTRATIO", "B", "LSTAT"];
@@ -136,8 +137,6 @@ var WeightVisWrapper = (function() {
this.svgContainer.node().parentNode.removeChild(this.controlContainer.node());
this.svgContainer.node().parentNode.appendChild(this.spinner.node().cloneNode(true));
this.svgContainer.node().parentNode.removeChild(this.svgContainer.node());
- this.container.node().appendChild(this.controlContainer.node());
- this.container.node().appendChild(this.svgContainer.node());
this.netVisualizer.stopAnimation();
this.slider.node().MaterialSlider.change(0);
};
@@ -162,10 +161,10 @@ var WeightVisWrapper = (function() {
/* helps with impress.js' stepenter/stepleave events */
var VisIntegrater = (function() {
- function VisIntegrater(enterCb, leaveCb) {
+ function VisIntegrater(enterCb, leaveCb, selector) {
var self = this;
this.slide = document.currentScript.parentElement;
- this.container = d3.select(this.slide).select(".visContainer");
+ this.container = d3.select(this.slide).select(selector);
this.slide.addEventListener("impress:stepenter", function() {
enterCb(self.slide);
});