File tree 4 files changed +7
-5
lines changed 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,9 @@ class DefaultEditor extends Component {
88
88
{ this . hasTransforms ( ) && (
89
89
< GraphTransformsPanel group = { _ ( 'Structure' ) } name = { _ ( 'Transforms' ) } />
90
90
) }
91
- < StyleLayoutPanel group = { _ ( 'Style' ) } name = { _ ( 'General' ) } />
91
+ < StyleLayoutPanel group = { _ ( 'Style' ) } name = { _ ( 'General' ) } collapsedOnStart />
92
92
< StyleTracesPanel group = { _ ( 'Style' ) } name = { _ ( 'Traces' ) } />
93
- { this . hasAxes ( ) && < StyleAxesPanel group = { _ ( 'Style' ) } name = { _ ( 'Axes' ) } /> }
93
+ { this . hasAxes ( ) && < StyleAxesPanel group = { _ ( 'Style' ) } name = { _ ( 'Axes' ) } collapsedOnStart /> }
94
94
{ this . hasMaps ( ) && < StyleMapsPanel group = { _ ( 'Style' ) } name = { _ ( 'Maps' ) } /> }
95
95
{ this . hasLegend ( ) && < StyleLegendPanel group = { _ ( 'Style' ) } name = { _ ( 'Legend' ) } /> }
96
96
{ this . hasColorbars ( ) && < StyleColorbarsPanel group = { _ ( 'Style' ) } name = { _ ( 'Color Bars' ) } /> }
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export class Panel extends Component {
68
68
} ) ;
69
69
70
70
if ( this . state . individualFoldStates . length !== numFolds ) {
71
- const newFoldStates = new Array ( numFolds ) . fill ( false ) ;
71
+ const newFoldStates = new Array ( numFolds ) . fill ( this . props . collapsedOnStart ) ;
72
72
this . setState ( {
73
73
individualFoldStates : this . props . addAction
74
74
? newFoldStates . map ( ( e , i ) => i !== numFolds - 1 )
@@ -129,10 +129,12 @@ Panel.propTypes = {
129
129
noPadding : PropTypes . bool ,
130
130
showExpandCollapse : PropTypes . bool ,
131
131
canReorder : PropTypes . bool ,
132
+ collapsedOnStart : PropTypes . bool ,
132
133
} ;
133
134
134
135
Panel . defaultProps = {
135
136
showExpandCollapse : true ,
137
+ collapsedOnStart : false ,
136
138
} ;
137
139
138
140
Panel . contextTypes = {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class StyleAxesPanel extends Component {
27
27
render ( ) {
28
28
const { localize : _ } = this . context ;
29
29
return (
30
- < LayoutPanel >
30
+ < LayoutPanel { ... this . props } >
31
31
< AxesFold
32
32
name = { _ ( 'Titles' ) }
33
33
axisFilter = { ( axis ) => ! ( axis . _name . includes ( 'angular' ) || axis . _subplot . includes ( 'geo' ) ) }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {HoverColor} from '../components/fields/derived';
21
21
import DataSelector from '../components/fields/DataSelector' ;
22
22
23
23
const StyleLayoutPanel = ( props , { localize : _ } ) => (
24
- < LayoutPanel >
24
+ < LayoutPanel { ... props } >
25
25
< PlotlyFold name = { _ ( 'Defaults' ) } >
26
26
< ColorPicker label = { _ ( 'Plot Background' ) } attr = "plot_bgcolor" />
27
27
< ColorPicker label = { _ ( 'Margin Color' ) } attr = "paper_bgcolor" />
You can’t perform that action at this time.
0 commit comments