diff --git a/src/components/layers/LayerList.jsx b/src/components/layers/LayerList.jsx index 6eab2e86..56ad83ec 100644 --- a/src/components/layers/LayerList.jsx +++ b/src/components/layers/LayerList.jsx @@ -24,7 +24,6 @@ function layerPrefix(name) { } function findClosestCommonPrefix(layers, idx) { - console.log('find prefix', idx, layers) const currentLayerPrefix = layerPrefix(layers[idx].id) let closestIdx = idx for (let i = idx; i > 0; i--) { @@ -118,14 +117,12 @@ class LayerListContainer extends React.Component { } else { newGroups[lookupKey] = true } - console.log(newGroups) this.setState({ collapsedGroups: newGroups }) } isCollapsed(groupPrefix, idx) { - console.log('is collapsed', groupPrefix, idx) const collapsed = this.state.collapsedGroups[[groupPrefix, idx].join('-')] return collapsed === undefined ? false : collapsed } @@ -151,7 +148,7 @@ class LayerListContainer extends React.Component { const listItem = 1 + 'maputnik-layer-list-item-group-last': idxInGroup == layers.length - 1 && layers.length > 1 })} index={idx} key={layer.id} diff --git a/src/styles/_layer.scss b/src/styles/_layer.scss index 1df0dd60..6d8aec4c 100644 --- a/src/styles/_layer.scss +++ b/src/styles/_layer.scss @@ -67,15 +67,15 @@ } &-item-collapsed { - max-height: 0; + position: absolute; + max-height: 0px; overflow: hidden; - padding: 0; - + padding: 0px; transition: max-height 0.1s ease-out; transition: padding 0.1s ease-out; } - &-item-collapsed-last { + &-item-group-last { border-bottom: 2px solid $color-gray; }