mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-29 23:04:43 +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,
|
||||
doc: React.PropTypes.string.isRequired,
|
||||
style: React.PropTypes.object,
|
||||
cursorTargetStyle: React.PropTypes.object,
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
|
@ -29,6 +30,7 @@ export default class DocLabel extends React.Component {
|
|||
onMouseOut={e => this.setState({showDoc: false})}
|
||||
style={{
|
||||
cursor: 'help',
|
||||
...this.props.cursorTargetStyle,
|
||||
}}
|
||||
>
|
||||
{this.props.label}
|
||||
|
|
|
@ -174,10 +174,16 @@ export default class ZoomSpecField extends React.Component {
|
|||
verticalAlign: 'top',
|
||||
backgroundColor: null,
|
||||
display: 'inline-block',
|
||||
paddingBottom: 0,
|
||||
paddingTop: 0,
|
||||
}}
|
||||
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>
|
||||
}
|
||||
<SpecField {...this.props} style={{ width: '50%' } }/>
|
||||
|
|
Loading…
Reference in a new issue