Skip to content

Commit 2a63a59

Browse files
autosize snaps dimensions back to defaults
autosize snaps dimensions back to defaults changes that match autosize branch of react-plotly.js bumping react-plotly.js to 1.2.0
1 parent 44969dd commit 2a63a59

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

examples/async-data/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"plotly.js": "^1.32.0",
88
"react": "^15.6.1",
99
"react-dom": "^15.6.1",
10-
"react-plotly.js": "^1.0.4",
1110
"react-plotly.js-editor": "0.5.1",
11+
"react-plotly.js": "^1.2.0",
1212
"react-scripts": "1.0.17"
1313
},
1414
"scripts": {

examples/custom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"plotly.js": "^1.32.0",
77
"react": "^16.2.0",
88
"react-dom": "^16.2.0",
9-
"react-plotly.js": "^1.0.4",
109
"react-plotly.js-editor": "0.5.1",
10+
"react-plotly.js": "^1.2.0",
1111
"react-scripts": "1.0.17"
1212
},
1313
"scripts": {

examples/redux/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"prop-types": "^15.6.0",
88
"react": "^16.2.0",
99
"react-dom": "^16.2.0",
10-
"react-plotly.js": "^1.0.4",
1110
"react-plotly.js-editor": "0.5.1",
11+
"react-plotly.js": "^1.2.0",
1212
"react-redux": "^5.0.6",
1313
"react-scripts": "1.0.17",
1414
"redux": "^3.7.2"

examples/simple/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"plotly.js": "^1.32.0",
77
"react": "^16.2.0",
88
"react-dom": "^16.2.0",
9-
"react-plotly.js": "^1.0.4",
109
"react-plotly.js-editor": "0.5.1",
10+
"react-plotly.js": "^1.2.0",
1111
"react-scripts": "1.0.17"
1212
},
1313
"scripts": {

examples/simple/src/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ class App extends Component {
4949
dataSourceOptions={dataSourceOptions}
5050
plotly={plotly}
5151
/>
52-
<div className="app__main">
52+
<div className="app__main" style={{width: '100%', height: '100%'}}>
5353
<Plot
5454
debug
55+
useResizeHandler
5556
data={this.state.graphDiv.data}
5657
layout={this.state.graphDiv.layout}
5758
onUpdate={this.handlePlotUpdate.bind(this)}
5859
onInitialized={this.handlePlotUpdate.bind(this)}
5960
revision={this.state.plotRevision}
61+
style={{width: '100%', height: '100%'}}
6062
/>
6163
</div>
6264
</div>

src/components/fields/derived.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ import {
1010

1111
export const CanvasSize = connectToContainer(UnconnectedNumeric, {
1212
modifyPlotProps: (props, context, plotProps) => {
13-
const {fullContainer} = plotProps;
13+
const {fullContainer, updateContainer, container} = plotProps;
1414
if (plotProps.isVisible && fullContainer && fullContainer.autosize) {
1515
plotProps.isVisible = false;
16+
if (container[props.attr]) {
17+
updateContainer({[props.attr]: {}});
18+
}
1619
}
1720
},
1821
});

0 commit comments

Comments
 (0)