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 {
35
35
} ,
36
36
] ,
37
37
} ,
38
- editorRevision : 0 ,
39
38
plotRevision : 0 ,
40
39
} ;
41
40
}
42
41
43
42
handlePlotUpdate ( graphDiv ) {
44
- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
43
+ this . setState ( { graphDiv} ) ;
45
44
}
46
45
47
46
handleEditorUpdate ( ) {
@@ -55,7 +54,6 @@ class App extends Component {
55
54
locale = "en"
56
55
graphDiv = { this . state . graphDiv }
57
56
onUpdate = { this . handleEditorUpdate . bind ( this ) }
58
- revision = { this . state . editorRevision }
59
57
plotly = { plotly }
60
58
dataSources = { dataSources }
61
59
dataSourceOptions = { dataSourceOptions }
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ class App extends Component {
26
26
// _fullLayout etc in handlePlotUpdate()
27
27
this . state = {
28
28
graphDiv : { } ,
29
- editorRevision : 0 ,
30
29
plotRevision : 0 ,
31
30
currentMockIndex : - 1 ,
32
31
mocks : [ ] ,
@@ -44,7 +43,7 @@ class App extends Component {
44
43
}
45
44
46
45
handlePlotUpdate ( graphDiv ) {
47
- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
46
+ this . setState ( { graphDiv} ) ;
48
47
}
49
48
50
49
handleEditorUpdate ( ) {
@@ -76,7 +75,6 @@ class App extends Component {
76
75
config = { { editable : true } }
77
76
graphDiv = { this . state . graphDiv }
78
77
onUpdate = { this . handleEditorUpdate . bind ( this ) }
79
- revision = { this . state . editorRevision }
80
78
dataSources = { dataSources }
81
79
dataSourceOptions = { dataSourceOptions }
82
80
plotly = { plotly }
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ class App extends Component {
38
38
dataSources,
39
39
dataSourceOptions,
40
40
graphDiv,
41
- editorRevision,
42
41
plotRevision,
43
42
} = this . props ;
44
43
@@ -51,7 +50,6 @@ class App extends Component {
51
50
dataSourceOptions = { dataSourceOptions }
52
51
graphDiv = { graphDiv }
53
52
onUpdate = { actions . editorUpdate }
54
- revision = { editorRevision }
55
53
plotly = { plotly }
56
54
/>
57
55
</ aside >
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ const initialState = {
4
4
dataSources : { } ,
5
5
dataSourceOptions : [ ] ,
6
6
graphDiv : { } ,
7
- editorRevision : 0 ,
8
7
plotRevision : 0 ,
9
8
} ;
10
9
@@ -23,7 +22,6 @@ export default (state = initialState, action) => {
23
22
return {
24
23
...state ,
25
24
graphDiv : action . payload ,
26
- editorRevision : state . editorRevision + 1 ,
27
25
} ;
28
26
case ACTIONS . INITIALIZE_PLOT :
29
27
return {
Original file line number Diff line number Diff line change @@ -25,13 +25,12 @@ class App extends Component {
25
25
// _fullLayout etc in handlePlotUpdate()
26
26
this . state = {
27
27
graphDiv : { } ,
28
- editorRevision : 0 ,
29
28
plotRevision : 0 ,
30
29
} ;
31
30
}
32
31
33
32
handlePlotUpdate ( graphDiv ) {
34
- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
33
+ this . setState ( { graphDiv} ) ;
35
34
}
36
35
37
36
handleEditorUpdate ( ) {
@@ -44,7 +43,6 @@ class App extends Component {
44
43
< PlotlyEditor
45
44
graphDiv = { this . state . graphDiv }
46
45
onUpdate = { this . handleEditorUpdate . bind ( this ) }
47
- revision = { this . state . editorRevision }
48
46
dataSources = { dataSources }
49
47
dataSourceOptions = { dataSourceOptions }
50
48
plotly = { plotly }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-chart-editor" ,
3
3
"description" : " plotly.js chart editor react component UI" ,
4
- "version" : " 0.10.2 " ,
4
+ "version" : " 0.11.0 " ,
5
5
"author" : " Plotly, Inc." ,
6
6
"bugs" : {
7
7
"url" : " https://github.com/plotly/react-chart-editor/issues"
You can’t perform that action at this time.
0 commit comments