mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:01:16 +01:00
Switch text in inspect button #64
This commit is contained in:
parent
82da251218
commit
bbe45cf8ee
2 changed files with 6 additions and 1 deletions
|
@ -227,6 +227,7 @@ export default class App extends React.Component {
|
||||||
|
|
||||||
const toolbar = <Toolbar
|
const toolbar = <Toolbar
|
||||||
mapStyle={this.state.mapStyle}
|
mapStyle={this.state.mapStyle}
|
||||||
|
inspectModeEnabled={this.state.inspectModeEnabled}
|
||||||
sources={this.state.sources}
|
sources={this.state.sources}
|
||||||
onStyleChanged={this.onStyleChanged.bind(this)}
|
onStyleChanged={this.onStyleChanged.bind(this)}
|
||||||
onStyleOpen={this.onStyleChanged.bind(this)}
|
onStyleOpen={this.onStyleChanged.bind(this)}
|
||||||
|
|
|
@ -49,6 +49,7 @@ function ToolbarAction(props) {
|
||||||
export default class Toolbar extends React.Component {
|
export default class Toolbar extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
mapStyle: React.PropTypes.object.isRequired,
|
mapStyle: React.PropTypes.object.isRequired,
|
||||||
|
inspectModeEnabled: React.PropTypes.bool.isRequired,
|
||||||
onStyleChanged: React.PropTypes.func.isRequired,
|
onStyleChanged: React.PropTypes.func.isRequired,
|
||||||
// A new style has been uploaded
|
// A new style has been uploaded
|
||||||
onStyleOpen: React.PropTypes.func.isRequired,
|
onStyleOpen: React.PropTypes.func.isRequired,
|
||||||
|
@ -128,7 +129,10 @@ export default class Toolbar extends React.Component {
|
||||||
</ToolbarAction>
|
</ToolbarAction>
|
||||||
<ToolbarAction onClick={this.props.onInspectModeToggle}>
|
<ToolbarAction onClick={this.props.onInspectModeToggle}>
|
||||||
<InspectionIcon />
|
<InspectionIcon />
|
||||||
<IconText>Inspect</IconText>
|
<IconText>
|
||||||
|
{ this.props.inspectModeEnabled && <span>Map Mode</span> }
|
||||||
|
{ !this.props.inspectModeEnabled && <span>Inspect Mode</span> }
|
||||||
|
</IconText>
|
||||||
</ToolbarAction>
|
</ToolbarAction>
|
||||||
<ToolbarLink href={"https://github.com/maputnik/editor/wiki"}>
|
<ToolbarLink href={"https://github.com/maputnik/editor/wiki"}>
|
||||||
<HelpIcon />
|
<HelpIcon />
|
||||||
|
|
Loading…
Reference in a new issue