Fixes for codemirror in sources modal

- Allows for max height
 - Override GeoJSON data when changing type
This commit is contained in:
orangemug
2019-10-20 11:09:20 +01:00
parent 9ac908948d
commit ee525631fa
5 changed files with 25 additions and 8 deletions

View File

@@ -116,6 +116,7 @@ class GeoJSONSourceJSONEditor extends React.Component {
return <InputBlock label={"GeoJSON"} doc={latest.source_geojson.data.doc}>
<JSONEditor
layer={this.props.source.data}
maxHeight={200}
onChange={data => {
this.props.onChange({
...this.props.source,