summaryrefslogtreecommitdiff
path: root/code/weightviswrapper.js
diff options
context:
space:
mode:
Diffstat (limited to 'code/weightviswrapper.js')
-rw-r--r--code/weightviswrapper.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/code/weightviswrapper.js b/code/weightviswrapper.js
index ca31916..52b60ed 100644
--- a/code/weightviswrapper.js
+++ b/code/weightviswrapper.js
@@ -17,7 +17,7 @@ var WeightVisWrapper = (function() {
this.svgContainer
.style("margin-top", "1.5em")
.style("margin-bottom", "1em")
- .style("height", "85%") // TODO find optimal height
+ .style("height", "75%") // TODO find optimal height
.style("width", "100%");
this.spinner = this.container.append("div")
@@ -96,7 +96,7 @@ var WeightVisWrapper = (function() {
}
});
this.slider.attr("max", this.steps()-1);
- this.slider.node().addEventListener("input", function() { self.jumpTo(self.value); });
+ this.slider.node().addEventListener("input", function() { self.jumpTo(this.value); });
this.button.node().addEventListener("click", function toggle() {
if (self.button.attr("data-pressed") != "true") {
var step = self.slider.node().value;
@@ -185,13 +185,13 @@ var WeightVisWrapper = (function() {
return this.netVisualizer.getSteps();
};
- WeightVisWrapper.prototype.calculate = function(inputs) {
+ WeightVisWrapper.prototype.calculate = function(inputs, step) {
// returns the final layer's outputs
- return this.netVisualizer.activate(inputs).pop();
+ return this.netVisualizer.activate(inputs, step).pop();
};
- WeightVisWrapper.prototype.activate = function(inputs) {
- this.netVisualizer.visualActivate(inputs);
+ WeightVisWrapper.prototype.activate = function(inputs, step) {
+ this.netVisualizer.visualActivate(inputs, step);
};
return WeightVisWrapper;
@@ -200,6 +200,7 @@ var WeightVisWrapper = (function() {
/* helps with impress.js' stepenter/stepleave events */
// TODO move into its own file
// TODO must be a step's direct child
+// TODO not steppable
var VisIntegrater = (function() {
function VisIntegrater(enterCb, leaveCb, selector) {
var self = this;