Nicer action on item list

This commit is contained in:
Lukas Martinelli
2016-12-20 19:20:56 +01:00
parent 6a129fcf3f
commit 6d9484ec5e
6 changed files with 141 additions and 41 deletions
-12
View File
@@ -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>