Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Enhancement] fix attribution color, add kepler smaller font (#1092)
Shan Hebadc9d2786c0
diff --git a/src/components/common/styled-components.js b/src/components/common/styled-components.jsindex 6419b01c7..3dbb89215 100644--- a/src/components/common/styled-components.js+++ b/src/components/common/styled-components.js@@ -439,8 +439,28 @@ export const StyledModalInputFootnote = styled.div.attrs({* This workaround will hide the error banner.*/export const StyledMapContainer = styled.div`- .mapboxgl-map .mapboxgl-missing-css {- display: none;+ .mapboxgl-map {+ .mapboxgl-missing-css {+ display: none;+ }+ .mapboxgl-ctrl-attrib {+ display: none;+ }+ }+`;++export const StyledAttrbution = styled.div.attrs({+ className: 'mapbox-attribution-container'+})`+ bottom: 0;+ right: 0;+ position: absolute;+ display: block;+ margin: 0 10px 2px;+ z-index: 999;+ a {+ color: black;+ font-size: 10px;}`;diff --git a/src/components/map-container.js b/src/components/map-container.jsindex e4fb54950..f4d286172 100644--- a/src/components/map-container.js+++ b/src/components/map-container.js@@ -29,7 +29,7 @@ import WebMercatorViewport from 'viewport-mercator-project';// componentsimport MapPopoverFactory from 'components/map/map-popover';import MapControlFactory from 'components/map/map-control';-import {StyledMapContainer} from 'components/common/styled-components';+import {StyledMapContainer, StyledAttrbution} from 'components/common/styled-components';import EditorFactory from './editor/editor';@@ -59,9 +59,21 @@ const MAPBOXGL_STYLE_UPDATE = 'style.load';const MAPBOXGL_RENDER = 'render';const TRANSITION_DURATION = 0;+const Attribution = () => (+ <StyledAttrbution>+ <a href="https://kepler.gl/policy/" target="_blank" rel="noopener noreferrer">© kepler.gl | </a>+ <a href="https://www.mapbox.com/about/maps/" target="_blank" rel="noopener noreferrer">© Mapbox | </a>+ <a href="http://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer">© OpenStreetMap | </a>+ <a href="https://www.mapbox.com/map-feedback/" target="_blank" rel="noopener noreferrer">+ <strong>Improve this map</strong>+ </a>+ </StyledAttrbution>+);+MapContainerFactory.deps = [MapPopoverFactory, MapControlFactory, EditorFactory];export default function MapContainerFactory(MapPopover, MapControl, Editor) {+class MapContainer extends Component {static propTypes = {// required@@ -510,6 +522,7 @@ export default function MapContainerFactory(MapPopover, MapControl, Editor) {</div>)}{this._renderMapPopover(layersToRender)}+ <Attribution/></StyledMapContainer>);}diff --git a/src/reducers/combined-updaters.js b/src/reducers/combined-updaters.jsindex 3a3754bbc..b722e799e 100644--- a/src/reducers/combined-updaters.js+++ b/src/reducers/combined-updaters.js@@ -18,27 +18,6 @@// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN// THE SOFTWARE.-// Copyright (c) 2020 Uber Technologies, Inc.-//-// Permission is hereby granted, free of charge, to any person obtaining a copy-// of this software and associated documentation files (the "Software"), to deal-// in the Software without restriction, including without limitation the rights-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell-// to use, copy, modify, merge_, publish, distribute, sublicense, and/or sell-// copies of the Software, and to permit persons to whom the Software is-// furnished to do so, subject to the following conditions:-//-// The above copyright notice and this permission notice shall be included in-// all copies or substantial portions of the Software.-//-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN-// THE SOFTWARE.-import {toggleModalUpdater, loadFilesSuccessUpdater} from './ui-state-updaters';import {updateVisDataUpdater as visStateUpdateVisDataUpdater,