File tree Expand file tree Collapse file tree 6 files changed +11
-6
lines changed Expand file tree Collapse file tree 6 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff line change @@ -10,9 +10,12 @@ import {
1010
1111export 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} ) ;
You can’t perform that action at this time.
0 commit comments