mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 16:15:30 +01:00
Show hint when hovering over function icon
This commit is contained in:
parent
d3276829b2
commit
cff0a15f7e
2 changed files with 9 additions and 1 deletions
|
@ -8,6 +8,7 @@ export default class DocLabel extends React.Component {
|
||||||
label: React.PropTypes.string.isRequired,
|
label: React.PropTypes.string.isRequired,
|
||||||
doc: React.PropTypes.string.isRequired,
|
doc: React.PropTypes.string.isRequired,
|
||||||
style: React.PropTypes.object,
|
style: React.PropTypes.object,
|
||||||
|
cursorTargetStyle: React.PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -29,6 +30,7 @@ export default class DocLabel extends React.Component {
|
||||||
onMouseOut={e => this.setState({showDoc: false})}
|
onMouseOut={e => this.setState({showDoc: false})}
|
||||||
style={{
|
style={{
|
||||||
cursor: 'help',
|
cursor: 'help',
|
||||||
|
...this.props.cursorTargetStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{this.props.label}
|
{this.props.label}
|
||||||
|
|
|
@ -174,10 +174,16 @@ export default class ZoomSpecField extends React.Component {
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
backgroundColor: null,
|
backgroundColor: null,
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
|
paddingBottom: 0,
|
||||||
|
paddingTop: 0,
|
||||||
}}
|
}}
|
||||||
onClick={this.makeZoomFunction.bind(this)}
|
onClick={this.makeZoomFunction.bind(this)}
|
||||||
>
|
>
|
||||||
<FunctionIcon />
|
<DocLabel
|
||||||
|
label={<FunctionIcon />}
|
||||||
|
cursorTargetStyle={{ cursor: 'pointer' }}
|
||||||
|
doc="Turn property into a zoom function to enable a map feature to change with map's zoom level."
|
||||||
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
<SpecField {...this.props} style={{ width: '50%' } }/>
|
<SpecField {...this.props} style={{ width: '50%' } }/>
|
||||||
|
|
Loading…
Reference in a new issue