Skip to content

Commit

Permalink
Merge pull request #1522 from meeseeksmachine/auto-backport-of-pr-152…
Browse files Browse the repository at this point in the history
…1-on-0.12.x

Backport PR #1521 on branch 0.12.x (Fix processPhosphorMessage for ipywidgets 7)
  • Loading branch information
martinRenou committed Sep 2, 2022
2 parents 230e590 + 38b5d4f commit e88ba3f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js/src/Figure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,17 @@ export class Figure extends widgets.DOMWidgetView {
this.plotarea_height = this.height - this.margin.top - this.margin.bottom;
}

processPhosphorMessage(msg) {
// @ts-ignore: The following line can only compile with ipywidgets 7
this._processLuminoMessage(msg, super.processPhosphorMessage);
}

processLuminoMessage(msg) {
super.processLuminoMessage.apply(this, arguments);
this._processLuminoMessage(msg, super.processLuminoMessage);
}

_processLuminoMessage(msg, _super) {
_super.call(this, msg);

switch (msg.type) {
case 'resize':
Expand Down

0 comments on commit e88ba3f

Please sign in to comment.