Skip to content

Commit

Permalink
Revert "Added checkbox for cluster attribute (#810)"
Browse files Browse the repository at this point in the history
This reverts commit 393f4a3.
  • Loading branch information
nyurik committed Oct 21, 2023
1 parent e4d559f commit 52f949e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
1 change: 0 additions & 1 deletion src/components/ModalSources.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ class AddSource extends React.Component {
}
case 'geojson_json': return {
type: 'geojson',
cluster: source.cluster || false,
data: {}
}
case 'tilejson_vector': return {
Expand Down
39 changes: 13 additions & 26 deletions src/components/ModalSourcesTypeEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ 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 {
Expand Down Expand Up @@ -81,7 +80,7 @@ class TileURLSourceEditor extends React.Component {
})}
/>
{this.props.children}
</div>
</div>

}
}
Expand Down Expand Up @@ -206,35 +205,23 @@ class GeoJSONSourceFieldJsonEditor extends React.Component {
}

render() {
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 => {
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 => {
this.props.onChange({
...this.props.source,
cluster: cluster,
data,
})
}}
/>
</div>
</Block>
}
}

Expand Down

0 comments on commit 52f949e

Please sign in to comment.