diff --git a/IPython/html/static/widgets/js/widget_link.js b/IPython/html/static/widgets/js/widget_link.js
index c6571c0..7ee00d4 100644
--- a/IPython/html/static/widgets/js/widget_link.js
+++ b/IPython/html/static/widgets/js/widget_link.js
@@ -9,9 +9,9 @@ define([
initialize: function() {
this.on("change:widgets", function(model, value, options) {
this.update_bindings(model.previous("widgets") || [], value);
- this.update_value(this.get("widgets")[0]);
+ this.update_value(this.get("widgets")[0]);
}, this);
- this.on("destroy", function(model, collection, options) {
+ this.on("destroy", function(model, collection, options) {
this.update_bindings(this.get("widgets"), []);
}, this);
},
@@ -19,12 +19,12 @@ define([
var that = this;
_.each(oldlist, function(elt) {elt[0].off("change:" + elt[1], null, that);});
_.each(newlist, function(elt) {elt[0].on("change:" + elt[1],
- function(model, value, options) {
- that.update_value(elt);
- }, that);
- // TODO: register for any destruction handlers
- // to take an item out of the list
- });
+ function(model, value, options) {
+ that.update_value(elt);
+ }, that);
+ // TODO: register for any destruction handlers
+ // to take an item out of the list
+ });
},
update_value: function(elt) {
if (this.updating) {return;}
@@ -34,10 +34,10 @@ define([
this.updating = true;
_.each(_.without(this.get("widgets"), elt),
function(element, index, list) {
- if (element[0]) {
- element[0].set(element[1], new_value);
- element[0].save_changes();
- }
+ if (element[0]) {
+ element[0].set(element[1], new_value);
+ element[0].save_changes();
+ }
}, this);
this.updating = false;
},
@@ -57,7 +57,7 @@ define([
this.source[0].off("change:" + this.source[1], null, this);
}
this.source = this.get("source");
- if (this.source) {
+ if (this.source) {
this.source[0].on("change:" + this.source[1], function() { this.update_value(this.source); }, this);
this.update_value(this.source);
}
@@ -70,16 +70,15 @@ define([
this.updating = true;
_.each(this.get("targets"),
function(element, index, list) {
- if (element[0]) {
- element[0].set(element[1], new_value);
- element[0].save_changes();
- }
+ if (element[0]) {
+ element[0].set(element[1], new_value);
+ element[0].save_changes();
+ }
}, this);
this.updating = false;
},
});
-
return {
"LinkModel": LinkModel,
"DirectionalLinkModel": DirectionalLinkModel,