We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51de36c commit 0a55669Copy full SHA for 0a55669
inst/htmlwidgets/plotly.js
@@ -8,10 +8,11 @@ HTMLWidgets.widget({
8
},
9
10
resize: function(el, width, height, instance) {
11
- if (el.layout.autosize || true) {
+ var layout = el.layout || {};
12
+ if (layout.autosize || true) {
13
// User specified height/width overrides htmlwidgets height/width
- var width = el.layout.width || width;
14
- var height = el.layout.height || height;
+ var width = layout.width || width;
15
+ var height = layout.height || height;
16
Plotly.relayout(el.id, {width: width, height: height});
17
}
18
0 commit comments