Skip to content

Commit

Permalink
fix #825: notifyResize for widget
Browse files Browse the repository at this point in the history
  • Loading branch information
sc1f committed Nov 26, 2019
1 parent df05d2a commit e017945
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/perspective-phosphor/src/ts/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ export class PerspectiveWidget extends Widget {
if (!viewer.notifyResize) {
console.warn("Warning: not bound to real element");
} else {
viewer.notifyResize = viewer.notifyResize.bind(viewer);
const resize_observer = new MutationObserver(viewer.notifyResize.bind(viewer));
resize_observer.observe(node, { attributes: true });
}
return viewer;
}
Expand Down

0 comments on commit e017945

Please sign in to comment.