Skip to content

Commit 064d0a9

Browse files
committed
Rebase
1 parent 219ea50 commit 064d0a9

File tree

12 files changed

+2529
-12228
lines changed

12 files changed

+2529
-12228
lines changed

Diff for: dev/App.js

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import React, {Component} from 'react';
2+
import {hot} from 'react-hot-loader';
23
import plotly from 'plotly.js/dist/plotly';
34
import createPlotComponent from 'react-plotly.js/factory';
45
import PlotlyEditor from '../src';
5-
import {hot} from 'react-hot-loader';
66
import '../src/styles/main.scss';
77
import Nav from './Nav';
88

9+
// https://github.com/plotly/react-plotly.js-editor#mapbox-access-tokens
10+
import ACCESS_TOKENS from '../accessTokens';
11+
912
const dataSources = {
1013
col1: [1, 2, 3], // eslint-disable-line no-magic-numbers
1114
col2: [4, 3, 2], // eslint-disable-line no-magic-numbers
@@ -71,12 +74,7 @@ class App extends Component {
7174

7275
render() {
7376
return (
74-
<div>
75-
<Nav
76-
mocks={this.state.mocks}
77-
currentMockIndex={this.state.currentMockIndex}
78-
loadMock={this.loadMock}
79-
/>
77+
<div className="app__container plotly-editor--theme-provider">
8078
<div className="app">
8179
<PlotlyEditor
8280
graphDiv={this.state.graphDiv}
@@ -85,20 +83,31 @@ class App extends Component {
8583
dataSources={dataSources}
8684
dataSourceOptions={dataSourceOptions}
8785
plotly={plotly}
86+
advancedTraceTypeSelector
8887
/>
8988
<div className="app__main" style={{width: '100%', height: '100%'}}>
9089
<Plot
91-
debug
92-
useResizeHandler
90+
config={{mapboxAccessToken: ACCESS_TOKENS.MAPBOX, editable: true}}
9391
data={this.state.graphDiv.data}
92+
debug
9493
layout={this.state.graphDiv.layout}
95-
onUpdate={this.handlePlotUpdate.bind(this)}
9694
onInitialized={this.handlePlotUpdate.bind(this)}
95+
onUpdate={this.handlePlotUpdate.bind(this)}
9796
revision={this.state.plotRevision}
98-
style={{width: '100%', height: '100%', minHeight: '100vh'}}
97+
useResizeHandler
98+
style={{
99+
width: '100%',
100+
height: '100%',
101+
minHeight: 'calc(100vh - 50px)',
102+
}}
99103
/>
100104
</div>
101105
</div>
106+
<Nav
107+
currentMockIndex={this.state.currentMockIndex}
108+
loadMock={this.loadMock}
109+
mocks={this.state.mocks}
110+
/>
102111
</div>
103112
);
104113
}

Diff for: dev/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import '../src/styles/main.scss';
3+
import './styles.css';
44
import App from './App';
55

66
ReactDOM.render(<App />, document.getElementById('root'));

0 commit comments

Comments
 (0)