2017-01-15 13:46:55 +01:00
|
|
|
import React from 'react'
|
|
|
|
|
2017-03-22 11:36:20 +01:00
|
|
|
import GlSpec from 'mapbox-gl/src/style-spec/reference/latest'
|
2017-01-15 13:46:55 +01:00
|
|
|
import InputBlock from '../inputs/InputBlock'
|
|
|
|
import NumberInput from '../inputs/NumberInput'
|
|
|
|
|
|
|
|
class MaxZoomBlock extends React.Component {
|
|
|
|
static propTypes = {
|
|
|
|
value: React.PropTypes.number.isRequired,
|
|
|
|
onChange: React.PropTypes.func.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return <InputBlock label={"Max Zoom"} doc={GlSpec.layer.maxzoom.doc}>
|
|
|
|
<NumberInput
|
|
|
|
value={this.props.value}
|
|
|
|
onChange={this.props.onChange}
|
|
|
|
min={GlSpec.layer.maxzoom.minimum}
|
|
|
|
max={GlSpec.layer.maxzoom.maximum}
|
|
|
|
default={GlSpec.layer.maxzoom.maximum}
|
|
|
|
/>
|
|
|
|
</InputBlock>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MaxZoomBlock
|