Skip to content

Commit c4c4222

Browse files
authored
Resize the plot on widget resize. Fixes #1845 (#1846)
1 parent 91e2b32 commit c4c4222

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/visualizers/widgets/TensorPlotter/TensorPlotterWidget.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,12 @@ define([
218218
}
219219

220220
onWidgetContainerResize (/*width, height*/) {
221-
this._logger.debug('Widget is resizing...');
221+
if (this.currentPlotData) {
222+
const {data, layout} = this.currentPlotData;
223+
Plotly.newPlot(this.$plot[0], data, layout);
224+
} else {
225+
Plotly.newPlot(this.$plot[0]);
226+
}
222227
}
223228

224229
defaultLayout(desc) {

0 commit comments

Comments
 (0)