mirror of
https://github.com/maputnik/editor.git
synced 2026-09-01 09:57:27 +00:00
Compare commits
2 Commits
3727c9ad5e
...
577663f706
| Author | SHA1 | Date | |
|---|---|---|---|
| 577663f706 | |||
| 393f4a38b9 |
@@ -152,7 +152,7 @@ export default class AppToolbar extends React.Component {
|
||||
id: "inspect",
|
||||
group: "general",
|
||||
title: "Inspect",
|
||||
disabled: this.props.renderer !== 'mlgljs',
|
||||
disabled: this.props.renderer === 'ol',
|
||||
},
|
||||
{
|
||||
id: "filter-deuteranopia",
|
||||
|
||||
@@ -128,6 +128,7 @@ class AddSource extends React.Component {
|
||||
}
|
||||
case 'geojson_json': return {
|
||||
type: 'geojson',
|
||||
cluster: source.cluster || false,
|
||||
data: {}
|
||||
}
|
||||
case 'tilejson_vector': return {
|
||||
|
||||
@@ -8,6 +8,7 @@ import FieldSelect from './FieldSelect'
|
||||
import FieldDynamicArray from './FieldDynamicArray'
|
||||
import FieldArray from './FieldArray'
|
||||
import FieldJson from './FieldJson'
|
||||
import FieldCheckbox from './FieldCheckbox'
|
||||
|
||||
|
||||
class TileJSONSourceEditor extends React.Component {
|
||||
@@ -80,7 +81,7 @@ class TileURLSourceEditor extends React.Component {
|
||||
})}
|
||||
/>
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
}
|
||||
@@ -205,23 +206,35 @@ class GeoJSONSourceFieldJsonEditor extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
return <Block label={"GeoJSON"} fieldSpec={latest.source_geojson.data}>
|
||||
<FieldJson
|
||||
layer={this.props.source.data}
|
||||
maxHeight={200}
|
||||
mode={{
|
||||
name: "javascript",
|
||||
json: true
|
||||
}}
|
||||
lint={true}
|
||||
onChange={data => {
|
||||
return <div>
|
||||
<Block label={"GeoJSON"} fieldSpec={latest.source_geojson.data}>
|
||||
<FieldJson
|
||||
layer={this.props.source.data}
|
||||
maxHeight={200}
|
||||
mode={{
|
||||
name: "javascript",
|
||||
json: true
|
||||
}}
|
||||
lint={true}
|
||||
onChange={data => {
|
||||
this.props.onChange({
|
||||
...this.props.source,
|
||||
data,
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</Block>
|
||||
<FieldCheckbox
|
||||
label={'Cluster'}
|
||||
value={this.props.source.cluster}
|
||||
onChange={cluster => {
|
||||
this.props.onChange({
|
||||
...this.props.source,
|
||||
data,
|
||||
cluster: cluster,
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</Block>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user