Added initial expression work and UI errors.

This commit is contained in:
orangemug
2020-01-29 08:22:03 +00:00
parent 63ed8c1de3
commit 725b752e35
25 changed files with 360 additions and 53 deletions

View File

@@ -48,14 +48,18 @@ export default class PropertyGroup extends React.Component {
}
render() {
const {errors} = this.props;
const fields = this.props.groupFields.map(fieldName => {
const fieldSpec = getFieldSpec(this.props.spec, this.props.layer.type, fieldName)
const paint = this.props.layer.paint || {}
const layout = this.props.layer.layout || {}
const fieldValue = fieldName in paint ? paint[fieldName] : layout[fieldName]
const fieldType = fieldName in paint ? 'paint' : 'layout';
const errorKey = fieldType+"."+fieldName;
return <FunctionSpecField
error={errors[errorKey]}
onChange={this.onPropertyChange}
key={fieldName}
fieldName={fieldName}