##// END OF EJS Templates
Added more comments to widget model JS
Jonathan Frederic -
Show More
@@ -108,6 +108,13 b' define(["components/underscore/underscore-min",'
108 for (var key in state) {
108 for (var key in state) {
109 if (state.hasOwnProperty(key)) {
109 if (state.hasOwnProperty(key)) {
110 if (key == "_css"){
110 if (key == "_css"){
111
112 // Set the css value of the model as an attribute
113 // instead of a backbone trait because we are only
114 // interested in backend css -> frontend css. In
115 // other words, if the css dict changes in the
116 // frontend, we don't need to push the changes to
117 // the backend.
111 this.css = state[key];
118 this.css = state[key];
112 } else {
119 } else {
113 this.set(key, state[key]);
120 this.set(key, state[key]);
@@ -291,6 +298,10 b' define(["components/underscore/underscore-min",'
291 status : function(msg){
298 status : function(msg){
292 that._handle_status(cell, msg);
299 that._handle_status(cell, msg);
293 },
300 },
301
302 // Special function only registered by widget messages.
303 // Allows us to get the cell for a message so we know
304 // where to add widgets if the code requires it.
294 get_cell : function() {
305 get_cell : function() {
295 if (that.last_modified_view != undefined &&
306 if (that.last_modified_view != undefined &&
296 that.last_modified_view.cell != undefined) {
307 that.last_modified_view.cell != undefined) {
General Comments 0
You need to be logged in to leave comments. Login now