Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Bug] Fix scrolling style (#31)
Shan He9d772b57f8c4
diff --git a/src/components/common/color-legend.js b/src/components/common/color-legend.jsindex 13ade4008..7ff9c7f97 100644--- a/src/components/common/color-legend.js+++ b/src/components/common/color-legend.js@@ -36,10 +36,10 @@ const GAP = 4;const RECT_W = 20;const StyledLegend = styled.div`- ${props => props.theme.dropdownScrollBar};+ ${props => props.theme.sidePanelScrollBar};max-height: 150px;- overflow-y: scroll;+ overflow-y: auto;svg {text {diff --git a/src/components/map/map-control.js b/src/components/map/map-control.jsindex 6533f8996..3ed153182 100644--- a/src/components/map/map-control.js+++ b/src/components/map/map-control.js@@ -96,7 +96,7 @@ const StyledMapControlPanel = styled.div`const StyledMapControlPanelContent = styled.div`${props => props.theme.dropdownScrollBar} max-height: 500px;min-height: 100px;- overflow: scroll;+ overflow: auto;`;const StyledMapControlPanelHeader = styled.div`diff --git a/src/components/map/map-legend.js b/src/components/map/map-legend.jsindex eb1352f8b..ff24e6bc5 100644--- a/src/components/map/map-legend.js+++ b/src/components/map/map-legend.js@@ -27,7 +27,7 @@ import {DIMENSIONS} from 'constants/default-settings';import {capitalizeFirstLetter} from 'utils/utils';const StyledMapControlLegend = styled.div`- padding: 10px ${props => props.theme.mapControl.padding}px;+ padding: 10px 0 10px ${props => props.theme.mapControl.padding}px;font-size: 11px;border-bottom-color: ${props => props.theme.panelBorderColor};border-bottom-style: solid;@@ -35,6 +35,7 @@ const StyledMapControlLegend = styled.div`.legend--layer_name {font-size: 12px;+ padding-right: ${props => props.theme.mapControl.padding}px;color: ${props => props.theme.textColorHl};font-weight: 500;}@@ -42,8 +43,13 @@ const StyledMapControlLegend = styled.div`color: ${props => props.theme.subtextColor};font-weight: 500;font-size: 11px;+ padding-right: ${props => props.theme.mapControl.padding}px;}-++ .legend--layer__title {+ padding-right: ${props => props.theme.mapControl.padding}px;+ }+.legend--layer_by {color: ${props => props.theme.subtextColor};}@@ -59,7 +65,7 @@ const StyledMapControlLegend = styled.div``;const VisualChannelMetric = ({name}) => (- <div>+ <div className="legend--layer__title"><span className="legend--layer_by">by </span><span className="legend--layer_color_field">{name}</span></div>diff --git a/src/components/side-panel/layer-panel/layer-type-selector.js b/src/components/side-panel/layer-panel/layer-type-selector.jsindex 0db7002ba..312dabf67 100644--- a/src/components/side-panel/layer-panel/layer-type-selector.js+++ b/src/components/side-panel/layer-panel/layer-type-selector.js@@ -32,6 +32,11 @@ import {SidePanelSection} from 'components/common/styled-components';+const ITEM_SIZE = {+ large: 60,+ small: 28+};+const StyledDropdownListItem = styled.div`padding-bottom: 12px;padding-right: 12px;@@ -62,7 +67,7 @@ const StyledListItem = styled.div`.layer-type-selector__item__icon {color: ${props => props.theme.activeColor};- background-size: 28px 28px;+ background-size: ${ITEM_SIZE.small}px ${ITEM_SIZE.small}px;margin-right: 12px;}}@@ -71,7 +76,7 @@ const StyledListItem = styled.div`color: ${props => props.theme.labelColor};display: flex;background-image: url(${`${CLOUDFRONT}/kepler.gl-layer-icon-bg.png`});- background-size: 64px 64px;+ background-size: ${ITEM_SIZE.large}px ${ITEM_SIZE.large}px;}.layer-type-selector__item__label {@@ -98,7 +103,7 @@ const LayerTypeListItem = ({value, isTile}) => (><div className="layer-type-selector__item__icon"><value.icon- height={isTile ? '64px' : '28px'}+ height={`${isTile ? ITEM_SIZE.large : ITEM_SIZE.small}px`}/></div><div className="layer-type-selector__item__label">{value.label}</div>