Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Enhancement] speed control step to 0.001 (#1155)
Shan He6034c80866ab
diff --git a/src/components/common/animation-control/animation-speed-slider.js b/src/components/common/animation-control/animation-speed-slider.jsindex ac0f7fa9c..8f98fcbc1 100644--- a/src/components/common/animation-control/animation-speed-slider.js+++ b/src/components/common/animation-control/animation-speed-slider.js@@ -22,7 +22,7 @@ import React, {Component} from 'react';import styled from 'styled-components';import RangeSliderFactory from 'components/common/range-slider';import onClickOutside from 'react-onclickoutside';-import {SPEED_CONTROL_RANGE} from 'constants/default-settings';+import {SPEED_CONTROL_RANGE, SPEED_CONTROL_STEP} from 'constants/default-settings';const SliderWrapper = styled.div`position: relative;@@ -57,7 +57,7 @@ export default function AnimationSpeedSliderFactory(RangeSlider) {<SliderWrapper><RangeSliderrange={SPEED_CONTROL_RANGE}- step={0.01}+ step={SPEED_CONTROL_STEP}value0={0}value1={this.props.speed}onChange={this._onChange}diff --git a/src/constants/default-settings.js b/src/constants/default-settings.jsindex 58353546c..eac7108c8 100644--- a/src/constants/default-settings.js+++ b/src/constants/default-settings.js@@ -795,6 +795,7 @@ export const DEFAULT_NOTIFICATION_TOPICS = keyMirror({export const BASE_SPEED = 600;export const DEFAULT_TIME_FORMAT = 'MM/DD/YY HH:mm:ssa';export const SPEED_CONTROL_RANGE = [0, 10];+export const SPEED_CONTROL_STEP = 0.001;// We could use directly react-map-gl-draw EditorMode but this would// create a direct dependency with react-map-gl-draw