Skip to content

Commit ea2d775

Browse files
committed
useAsDefaultTrace as default prop
1 parent bc35be0 commit ea2d775

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/EditorControls.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ class EditorControls extends Component {
119119
this.props.beforeAddTrace(payload);
120120
}
121121

122-
graphDiv.data.push(
123-
this.props.useAsDefaultTrace
124-
? this.props.useAsDefaultTrace
125-
: {type: 'scatter', mode: 'markers'}
126-
);
122+
graphDiv.data.push(this.props.useAsDefaultTrace);
127123

128124
if (this.props.afterAddTrace) {
129125
this.props.afterAddTrace(payload);
@@ -315,6 +311,7 @@ EditorControls.defaultProps = {
315311
traces: _ => traceTypes(_),
316312
complex: true,
317313
},
314+
useAsDefaultTrace: {type: 'scatter', mode: 'markers'},
318315
};
319316

320317
EditorControls.childContextTypes = {

0 commit comments

Comments
 (0)