Skip to content

Commit

Permalink
Resize the plot on widget resize. Fixes #1845 (#1846)
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb authored Aug 6, 2020
1 parent 91e2b32 commit c4c4222
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/visualizers/widgets/TensorPlotter/TensorPlotterWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ define([
}

onWidgetContainerResize (/*width, height*/) {
this._logger.debug('Widget is resizing...');
if (this.currentPlotData) {
const {data, layout} = this.currentPlotData;
Plotly.newPlot(this.$plot[0], data, layout);
} else {
Plotly.newPlot(this.$plot[0]);
}
}

defaultLayout(desc) {
Expand Down

0 comments on commit c4c4222

Please sign in to comment.