We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9c671f commit 2b1fc2cCopy full SHA for 2b1fc2c
inst/htmlwidgets/plotly.js
@@ -8,7 +8,9 @@ HTMLWidgets.widget({
8
},
9
10
resize: function(el, width, height, instance) {
11
- Plotly.relayout(el.id, {width: width, height: height});
+ if (instance.autosize) {
12
+ Plotly.relayout(el.id, {width: width, height: height});
13
+ }
14
15
16
renderValue: function(el, x, instance) {
@@ -27,6 +29,7 @@ HTMLWidgets.widget({
27
29
if (!instance.plotly) {
28
30
Plotly.plot(graphDiv, x.data, x.layout, x.config);
31
instance.plotly = true;
32
+ instance.autosize = x.layout.autosize;
33
} else {
34
Plotly.newPlot(graphDiv, x.data, x.layout);
35
}
0 commit comments