File tree Expand file tree Collapse file tree 6 files changed +4
-14
lines changed Expand file tree Collapse file tree 6 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,12 @@ class App extends Component {
3535 } ,
3636 ] ,
3737 } ,
38- editorRevision : 0 ,
3938 plotRevision : 0 ,
4039 } ;
4140 }
4241
4342 handlePlotUpdate ( graphDiv ) {
44- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
43+ this . setState ( { graphDiv} ) ;
4544 }
4645
4746 handleEditorUpdate ( ) {
@@ -55,7 +54,6 @@ class App extends Component {
5554 locale = "en"
5655 graphDiv = { this . state . graphDiv }
5756 onUpdate = { this . handleEditorUpdate . bind ( this ) }
58- revision = { this . state . editorRevision }
5957 plotly = { plotly }
6058 dataSources = { dataSources }
6159 dataSourceOptions = { dataSourceOptions }
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ class App extends Component {
2626 // _fullLayout etc in handlePlotUpdate()
2727 this . state = {
2828 graphDiv : { } ,
29- editorRevision : 0 ,
3029 plotRevision : 0 ,
3130 currentMockIndex : - 1 ,
3231 mocks : [ ] ,
@@ -44,7 +43,7 @@ class App extends Component {
4443 }
4544
4645 handlePlotUpdate ( graphDiv ) {
47- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
46+ this . setState ( { graphDiv} ) ;
4847 }
4948
5049 handleEditorUpdate ( ) {
@@ -76,7 +75,6 @@ class App extends Component {
7675 config = { { editable : true } }
7776 graphDiv = { this . state . graphDiv }
7877 onUpdate = { this . handleEditorUpdate . bind ( this ) }
79- revision = { this . state . editorRevision }
8078 dataSources = { dataSources }
8179 dataSourceOptions = { dataSourceOptions }
8280 plotly = { plotly }
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ class App extends Component {
3838 dataSources,
3939 dataSourceOptions,
4040 graphDiv,
41- editorRevision,
4241 plotRevision,
4342 } = this . props ;
4443
@@ -51,7 +50,6 @@ class App extends Component {
5150 dataSourceOptions = { dataSourceOptions }
5251 graphDiv = { graphDiv }
5352 onUpdate = { actions . editorUpdate }
54- revision = { editorRevision }
5553 plotly = { plotly }
5654 />
5755 </ aside >
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ const initialState = {
44 dataSources : { } ,
55 dataSourceOptions : [ ] ,
66 graphDiv : { } ,
7- editorRevision : 0 ,
87 plotRevision : 0 ,
98} ;
109
@@ -23,7 +22,6 @@ export default (state = initialState, action) => {
2322 return {
2423 ...state ,
2524 graphDiv : action . payload ,
26- editorRevision : state . editorRevision + 1 ,
2725 } ;
2826 case ACTIONS . INITIALIZE_PLOT :
2927 return {
Original file line number Diff line number Diff line change @@ -25,13 +25,12 @@ class App extends Component {
2525 // _fullLayout etc in handlePlotUpdate()
2626 this . state = {
2727 graphDiv : { } ,
28- editorRevision : 0 ,
2928 plotRevision : 0 ,
3029 } ;
3130 }
3231
3332 handlePlotUpdate ( graphDiv ) {
34- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
33+ this . setState ( { graphDiv} ) ;
3534 }
3635
3736 handleEditorUpdate ( ) {
@@ -44,7 +43,6 @@ class App extends Component {
4443 < PlotlyEditor
4544 graphDiv = { this . state . graphDiv }
4645 onUpdate = { this . handleEditorUpdate . bind ( this ) }
47- revision = { this . state . editorRevision }
4846 dataSources = { dataSources }
4947 dataSourceOptions = { dataSourceOptions }
5048 plotly = { plotly }
Original file line number Diff line number Diff line change 11{
22 "name" : " react-chart-editor" ,
33 "description" : " plotly.js chart editor react component UI" ,
4- "version" : " 0.10.2 " ,
4+ "version" : " 0.11.0 " ,
55 "author" : " Plotly, Inc." ,
66 "bugs" : {
77 "url" : " https://github.com/plotly/react-chart-editor/issues"
You can’t perform that action at this time.
0 commit comments