mirror of
https://github.com/maputnik/editor.git
synced 2026-07-27 16:27:26 +00:00
Nicer action on item list
This commit is contained in:
@@ -31,7 +31,6 @@ export default class LayerEditor extends React.Component {
|
||||
sources: React.PropTypes.object,
|
||||
vectorLayers: React.PropTypes.object,
|
||||
onLayerChanged: React.PropTypes.func,
|
||||
onLayerDestroyed: React.PropTypes.func,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
@@ -98,10 +97,6 @@ export default class LayerEditor extends React.Component {
|
||||
/>
|
||||
})
|
||||
|
||||
let visibleIcon = <MdVisibilityOff />
|
||||
if('layout' in this.props.layer && this.props.layer.layout.visibility === 'none') {
|
||||
visibleIcon = <MdVisibility />
|
||||
}
|
||||
return <div style={{
|
||||
padding: theme.scale[0],
|
||||
}}>
|
||||
@@ -109,13 +104,6 @@ export default class LayerEditor extends React.Component {
|
||||
<NavItem style={{fontWeight: 400}}>
|
||||
{this.props.layer.id}
|
||||
</NavItem>
|
||||
<Space auto x={1} />
|
||||
<NavItem onClick={this.toggleVisibility.bind(this)}>
|
||||
{visibleIcon}
|
||||
</NavItem>
|
||||
<NavItem onClick={(e) => this.props.onLayerDestroyed(this.props.layer)}>
|
||||
<MdDelete />
|
||||
</NavItem>
|
||||
</Toolbar>
|
||||
{propertyGroups}
|
||||
{this.props.layer.type !== 'background' && <div>
|
||||
|
||||
Reference in New Issue
Block a user