##// END OF EJS Templates
Solving #5997: instances of WidgetView (that are not instances of DOMWidgetView) do not trigger widget_area.show anymore.
Sylvain Corlay -
Show More
@@ -66,12 +66,11 b' define(['
66 66 if (view === null) {
67 67 console.error("View creation failed", model);
68 68 }
69 this._handle_display_view(view);
69 70 if (cell.widget_subarea) {
70 cell.widget_area.show();
71 this._handle_display_view(view);
72 71 cell.widget_subarea.append(view.$el);
73 view.trigger('displayed');
74 72 }
73 view.trigger('displayed');
75 74 }
76 75 };
77 76
@@ -370,6 +370,14 b' define(["widgets/js/manager",'
370 370 // By default, this is only called the first time the view is created
371 371 },
372 372
373 show: function(){
374 // Show the widget-area
375 if (this.options && this.options.cell &&
376 this.options.cell.widget_area !== undefined) {
377 this.options.cell.widget_area.show();
378 }
379 },
380
373 381 send: function (content) {
374 382 // Send a custom msg associated with this view.
375 383 this.model.send(content, this.callbacks());
@@ -390,6 +398,7 b' define(["widgets/js/manager",'
390 398 this.model.on('change', this.update, this);
391 399 this.model.on('msg:custom', this.on_msg, this);
392 400 DOMWidgetView.__super__.initialize.apply(this, arguments);
401 this.on('displayed', this.show, this);
393 402 },
394 403
395 404 on_msg: function(msg) {
General Comments 0
You need to be logged in to leave comments. Login now