Rename ZoomSpecField to FunctionSpecField

This commit is contained in:
pjsier 2017-10-10 14:23:20 -05:00
parent 148f64c261
commit 4af7a71220
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ function isDataField(value) {
/** Supports displaying spec field for zoom function objects /** Supports displaying spec field for zoom function objects
* https://www.mapbox.com/mapbox-gl-style-spec/#types-function-zoom-property * https://www.mapbox.com/mapbox-gl-style-spec/#types-function-zoom-property
*/ */
export default class ZoomSpecProperty extends React.Component { export default class FunctionSpecProperty extends React.Component {
static propTypes = { static propTypes = {
onChange: React.PropTypes.func.isRequired, onChange: React.PropTypes.func.isRequired,
fieldName: React.PropTypes.string.isRequired, fieldName: React.PropTypes.string.isRequired,

View file

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
import ZoomSpecField from './ZoomSpecField' import FunctionSpecField from './FunctionSpecField'
const iconProperties = ['background-pattern', 'fill-pattern', 'line-pattern', 'fill-extrusion-pattern', 'icon-image'] const iconProperties = ['background-pattern', 'fill-pattern', 'line-pattern', 'fill-extrusion-pattern', 'icon-image']
/** Extract field spec by {@fieldName} from the {@layerType} in the /** Extract field spec by {@fieldName} from the {@layerType} in the
@ -54,7 +54,7 @@ export default class PropertyGroup extends React.Component {
const layout = this.props.layer.layout || {} const layout = this.props.layer.layout || {}
const fieldValue = fieldName in paint ? paint[fieldName] : layout[fieldName] const fieldValue = fieldName in paint ? paint[fieldName] : layout[fieldName]
return <ZoomSpecField return <FunctionSpecField
onChange={this.onPropertyChange.bind(this)} onChange={this.onPropertyChange.bind(this)}
key={fieldName} key={fieldName}
fieldName={fieldName} fieldName={fieldName}