From b088af15865cf341a1b56f2f5caf5c8d638161b1 Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Mon, 19 Dec 2016 12:59:04 +0100 Subject: [PATCH] Upgrade style spec to version used in renderer --- package.json | 2 +- src/fields/spec.jsx | 2 +- src/filter/editor.jsx | 2 +- src/layers/editor.jsx | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9c4ad0c..0604f8a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "file-saver": "^1.3.2", "immutable": "^3.8.1", "mapbox-gl": "^0.28.0", - "mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae", + "mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#e85407a377510acb647161de6be6357ab4f606dd", "ol-mapbox-style": "0.0.11", "openlayers": "^3.19.1", "radium": "^0.18.1", diff --git a/src/fields/spec.jsx b/src/fields/spec.jsx index dac6463..698e0bc 100644 --- a/src/fields/spec.jsx +++ b/src/fields/spec.jsx @@ -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} /> ) diff --git a/src/filter/editor.jsx b/src/filter/editor.jsx index a334c97..86c29c1 100644 --- a/src/filter/editor.jsx +++ b/src/filter/editor.jsx @@ -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 }) diff --git a/src/layers/editor.jsx b/src/layers/editor.jsx index f579818..9da36ba 100644 --- a/src/layers/editor.jsx +++ b/src/layers/editor.jsx @@ -132,7 +132,6 @@ export class LayerEditor extends React.Component { visibleIcon = } - console.log(this.props.layer.toJSON()) return
@@ -149,7 +148,7 @@ export class LayerEditor extends React.Component { {this.props.layer.get('type') !== 'background' &&