mirror of
https://github.com/maputnik/editor.git
synced 2025-12-29 17:40:01 +00:00
Upgrade style spec to version used in renderer
This commit is contained in:
@@ -104,7 +104,7 @@ class SpecField extends React.Component {
|
||||
onChange={this.onValueChanged.bind(this, this.props.fieldName)}
|
||||
value={this.props.value}
|
||||
name={label}
|
||||
allowedValues={this.props.fieldSpec.values}
|
||||
allowedValues={Object.keys(this.props.fieldSpec.values)}
|
||||
doc={this.props.fieldSpec.doc}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class FilterEditor extends React.Component {
|
||||
const prop = f[1]
|
||||
const args = f.slice(2)
|
||||
|
||||
const availableFilterOperators = GlSpec.filter_operator.values
|
||||
const availableFilterOperators = Object.keys(GlSpec.filter_operator.values)
|
||||
const filterOpOptions = availableFilterOperators.map(value => {
|
||||
return <option value={value}>{value}</option>
|
||||
})
|
||||
|
||||
@@ -132,7 +132,6 @@ export class LayerEditor extends React.Component {
|
||||
visibleIcon = <MdVisibility />
|
||||
}
|
||||
|
||||
console.log(this.props.layer.toJSON())
|
||||
return <div style={{
|
||||
padding: theme.scale[0],
|
||||
}}>
|
||||
@@ -149,7 +148,7 @@ export class LayerEditor extends React.Component {
|
||||
</NavItem>
|
||||
</Toolbar>
|
||||
<FilterEditor
|
||||
filter={this.props.layer.get('filter').toJSON()}
|
||||
filter={this.props.layer.get('filter', Immutable.List()).toJSON()}
|
||||
onFilterChanged={console.log}
|
||||
/>
|
||||
{this.props.layer.get('type') !== 'background' && <SourceEditor
|
||||
|
||||
Reference in New Issue
Block a user