##// END OF EJS Templates
Better comments in _display_view
Jonathan Frederic -
Show More
@@ -203,6 +203,7 b' define(["components/underscore/underscore-min",'
203 _display_view: function (view_name, parent_comm_id, cell) {
203 _display_view: function (view_name, parent_comm_id, cell) {
204 var new_views = [];
204 var new_views = [];
205
205
206 // Try creating and adding the view to it's parent.
206 var displayed = false;
207 var displayed = false;
207 if (parent_comm_id != undefined) {
208 if (parent_comm_id != undefined) {
208 var parent_comm = this.comm_manager.comms[parent_comm_id];
209 var parent_comm = this.comm_manager.comms[parent_comm_id];
@@ -221,9 +222,9 b' define(["components/underscore/underscore-min",'
221 }
222 }
222 }
223 }
223
224
225 // If no parent view is defined or exists. Add the view's
226 // element to cell's widget div.
224 if (!displayed) {
227 if (!displayed) {
225 // No parent view is defined or exists. Add the view's
226 // element to cell's widget div.
227 var view = this._create_view(view_name, cell);
228 var view = this._create_view(view_name, cell);
228 if (view != null) {
229 if (view != null) {
229 new_views.push(view);
230 new_views.push(view);
@@ -235,6 +236,7 b' define(["components/underscore/underscore-min",'
235 }
236 }
236 }
237 }
237
238
239 // Force the new view(s) to update their selves
238 for (var view_index in new_views) {
240 for (var view_index in new_views) {
239 var view = new_views[view_index];
241 var view = new_views[view_index];
240 view.update();
242 view.update();
General Comments 0
You need to be logged in to leave comments. Login now