Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[bug] Unblock Mapbox logo (#44)

Shan He19899dc95310
diff --git a/src/components/filters/time-widget.js b/src/components/filters/time-widget.js
index e91e8dc01..76fa8effe 100644
--- a/src/components/filters/time-widget.js
+++ b/src/components/filters/time-widget.js
@@ -31,7 +31,10 @@ const innerPdSide = 32;
const WidgetContainer = styled.div`
position: absolute;
- padding: 20px;
+ padding-top: ${props => props.theme.sidePanel.margin.top}px;
+ padding-right: ${props => props.theme.sidePanel.margin.right}px;
+ padding-bottom: ${props => props.theme.sidePanel.margin.bottom}px;
+ padding-left: ${props => props.theme.sidePanel.margin.left}px;
bottom: 0;
right: 0;
z-index: 1;
diff --git a/src/components/kepler-gl.js b/src/components/kepler-gl.js
index 97e12caf3..82baef642 100644
--- a/src/components/kepler-gl.js
+++ b/src/components/kepler-gl.js
@@ -290,7 +290,7 @@ function KeplerGlFactory(
uiState={uiState}
visStateActions={visStateActions}
sidePanelWidth={
- DIMENSIONS.sidePanel.width + DIMENSIONS.sidePanel.margin
+ DIMENSIONS.sidePanel.width + DIMENSIONS.sidePanel.margin.left
}
containerW={containerW}
/>
diff --git a/src/components/side-panel/side-bar.js b/src/components/side-panel/side-bar.js
index 91d97248e..66664bd5b 100644
--- a/src/components/side-panel/side-bar.js
+++ b/src/components/side-panel/side-bar.js
@@ -26,11 +26,14 @@ import {ArrowRight} from 'components/common/icons';
const StyledSidePanelContainer = styled.div`
z-index: 99;
height: 100%;
- width: ${props => props.width + 2 * props.theme.sidePanel.margin}px;
+ width: ${props => props.width + 2 * props.theme.sidePanel.margin.left}px;
display: flex;
transition: width 250ms;
position: absolute;
- padding: ${props => props.theme.sidePanel.margin}px;
+ padding-top: ${props => props.theme.sidePanel.margin.top}px;
+ padding-right: ${props => props.theme.sidePanel.margin.right}px;
+ padding-bottom: ${props => props.theme.sidePanel.margin.bottom}px;
+ padding-left: ${props => props.theme.sidePanel.margin.left}px;
`;
const SideBarContainer = styled.div`
@@ -60,7 +63,7 @@ const CollapseButton = styled.div`
height: 20px;
position: absolute;
right: -8px;
- top: ${props => props.theme.sidePanel.margin}px;
+ top: ${props => props.theme.sidePanel.margin.top}px;
width: 20px;
:hover {
diff --git a/src/constants/default-settings.js b/src/constants/default-settings.js
index 4e5b18720..7de6d68bf 100644
--- a/src/constants/default-settings.js
+++ b/src/constants/default-settings.js
@@ -47,7 +47,7 @@ export const KEPLER_GL_VERSION = 'v1.0';
export const DIMENSIONS = {
sidePanel: {
width: 300,
- margin: 20,
+ margin: {top: 20, left: 20, bottom: 30, right: 20},
headerHeight: 96
},
mapControl: {