File tree Expand file tree Collapse file tree 5 files changed +3
-67
lines changed Expand file tree Collapse file tree 5 files changed +3
-67
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ class App extends Component {
3333 // _fullLayout etc in handlePlotUpdate()
3434 this . state = {
3535 graphDiv : { } ,
36- editorRevision : 0 ,
3736 plotRevision : 0 ,
3837 currentMockIndex : - 1 ,
3938 mocks : [ ] ,
@@ -51,7 +50,7 @@ class App extends Component {
5150 }
5251
5352 handlePlotUpdate ( graphDiv ) {
54- this . setState ( ( { editorRevision : x } ) => ( { editorRevision : x + 1 , graphDiv} ) ) ;
53+ this . setState ( { graphDiv} ) ;
5554 }
5655
5756 handleEditorUpdate ( ) {
@@ -82,7 +81,6 @@ class App extends Component {
8281 < PlotlyEditor
8382 graphDiv = { this . state . graphDiv }
8483 onUpdate = { this . handleEditorUpdate . bind ( this ) }
85- revision = { this . state . editorRevision }
8684 dataSources = { dataSources }
8785 dataSourceOptions = { dataSourceOptions }
8886 plotly = { plotly }
Original file line number Diff line number Diff line change @@ -19,18 +19,6 @@ class PlotlyEditor extends Component {
1919 }
2020 }
2121
22- shouldComponentUpdate ( nextProps ) {
23- if (
24- nextProps . revision === void 0 ||
25- nextProps . revision !== this . props . revision ||
26- nextProps . dataSources !== this . props . dataSources ||
27- nextProps . dataSourceOptions !== this . props . dataSourceOptions
28- ) {
29- return true ;
30- }
31- return false ;
32- }
33-
3422 getChildContext ( ) {
3523 const gd = this . props . graphDiv || { } ;
3624 return {
@@ -253,7 +241,6 @@ PlotlyEditor.propTypes = {
253241 locale : PropTypes . string ,
254242 onUpdate : PropTypes . func ,
255243 plotly : PropTypes . object ,
256- revision : PropTypes . any ,
257244 traceTypesConfig : PropTypes . object ,
258245} ;
259246
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class Section extends Component {
4242 // for now, only allowing for cartesian chart types
4343 if (
4444 data . length > 1 &&
45+ data [ fullContainer . index ] &&
4546 traceTypeToAxisType ( data [ fullContainer . index ] . type ) === 'cartesian'
4647 ) {
4748 this . sectionVisible = true ;
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ TraceSelector.propTypes = {
127127 getValObject : PropTypes . func ,
128128 container : PropTypes . object . isRequired ,
129129 fullContainer : PropTypes . object . isRequired ,
130- fullValue : PropTypes . any . isRequired ,
130+ fullValue : PropTypes . any ,
131131 localize : PropTypes . func ,
132132 updateContainer : PropTypes . func ,
133133} ;
You can’t perform that action at this time.
0 commit comments