import React from 'react' import Immutable from 'immutable' import { Heading, Toolbar, NavItem, Space} from 'rebass' import { LayerEditor } from './editor.jsx' import scrollbars from '../scrollbars.scss' // List of collapsible layer editors export class LayerList extends React.Component { static propTypes = { layers: React.PropTypes.instanceOf(Immutable.OrderedMap), onLayersChanged: React.PropTypes.func.isRequired } constructor(props) { super(props) } onLayerDestroyed(deletedLayer) { const remainingLayers = this.props.layers.delete(deletedLayer.get('id')) this.props.onLayersChanged(remainingLayers) } onLayerChanged(layer) { const changedLayers = this.props.layers.set(layer.get('id'), layer) this.props.onLayersChanged(changedLayers) } render() { var layerPanels = [] layerPanels = this.props.layers.map(layer => { return }).toIndexedSeq() return
Layers
{layerPanels}
} }