We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb10cda commit 72bd60fCopy full SHA for 72bd60f
inst/htmlwidgets/plotly.js
@@ -166,10 +166,15 @@ HTMLWidgets.widget({
166
167
} else {
168
169
+ // new x data could contain a new height/width...
170
+ // attach to instance so that resize logic knows about the new size
171
+ instance.width = x.layout.width || instance.width;
172
+ instance.height = x.layout.height || instance.height;
173
+
174
// this is essentially equivalent to Plotly.newPlot(), but avoids creating
175
// a new webgl context
176
// https://github.com/plotly/plotly.js/blob/2b24f9def901831e61282076cf3f835598d56f0e/src/plot_api/plot_api.js#L531-L532
-
177
178
// TODO: restore crosstalk selections?
179
Plotly.purge(graphDiv);
180
// TODO: why is this necessary to get crosstalk working?
0 commit comments