diff --git a/src/client/components/facet_results/TemporalMap.js b/src/client/components/facet_results/TemporalMap.js index d81b6b101464e21d33bedd14bb884febc5b7b6eb..6a0b2116867411c3d6e09dfb923486f241e57ce4 100644 --- a/src/client/components/facet_results/TemporalMap.js +++ b/src/client/components/facet_results/TemporalMap.js @@ -212,6 +212,7 @@ class TemporalMap extends Component { dates={dates} animateMap={animateMap} initialValue={this.props.animationValue[0]} + sliderDuration={this.props.sliderDuration} /> {this._renderTooltip()} </ReactMapGL> diff --git a/src/client/components/facet_results/TemporalMapTimeSlider.js b/src/client/components/facet_results/TemporalMapTimeSlider.js index d334e597c2999b23c8ea14487afff57c76662f32..0385ad806dba78ace9aec942bf2825b2868b6cd3 100644 --- a/src/client/components/facet_results/TemporalMapTimeSlider.js +++ b/src/client/components/facet_results/TemporalMapTimeSlider.js @@ -2,11 +2,8 @@ import React from 'react' import { withStyles } from '@material-ui/core/styles' import PropTypes from 'prop-types' import Slider from '@material-ui/core/Slider' -import { SLIDER_DURATION } from '../../configs/sampo/GeneralConfig' import { BaseControl } from 'react-map-gl' import moment from 'moment' -// import iconImg from './icon.png'; -// import BarChart from './TemporalMapBarChart'; const blue = 'rgb(0, 126, 230)' const iOSBoxShadow = @@ -56,7 +53,7 @@ class TemporalMapTimeSlider extends BaseControl { currentDay: null, hideContainer: '', value: 0, - sliderDuration: SLIDER_DURATION.normalSpeed, + sliderDuration: this.props.sliderDuration.normalSpeed, intervalSetter: null, isPlaying: false, playOrPause: 'play', @@ -143,7 +140,7 @@ class TemporalMapTimeSlider extends BaseControl { if (type === 'half') { this.setState( { - sliderDuration: SLIDER_DURATION.halfSpeed, + sliderDuration: this.props.sliderDuration.halfSpeed, halfSpeedEnabled: true, regularSpeedEnabled: false, doubleSpeedEnabled: false @@ -156,7 +153,7 @@ class TemporalMapTimeSlider extends BaseControl { } else if (type === 'regular') { this.setState( { - sliderDuration: SLIDER_DURATION.normalSpeed, + sliderDuration: this.props.sliderDuration.normalSpeed, halfSpeedEnabled: false, regularSpeedEnabled: true, doubleSpeedEnabled: false @@ -169,7 +166,7 @@ class TemporalMapTimeSlider extends BaseControl { } else if (type === 'double') { this.setState( { - sliderDuration: SLIDER_DURATION.doubleSpeed, + sliderDuration: this.props.sliderDuration.doubleSpeed, halfSpeedEnabled: false, regularSpeedEnabled: false, doubleSpeedEnabled: true diff --git a/src/client/containers/SemanticPortal.js b/src/client/containers/SemanticPortal.js index 4f0ba9b645846e8cffe2b3c10456b385652eaf5f..3d651b09b56e87c2df2b1fc7e55229a19c152d07 100644 --- a/src/client/containers/SemanticPortal.js +++ b/src/client/containers/SemanticPortal.js @@ -59,6 +59,7 @@ const { layoutConfig, MAPBOX_ACCESS_TOKEN, MAPBOX_STYLE, + SLIDER_DURATION, yasguiBaseUrl, yasguiParams } = await import(`../configs/${portalID}/GeneralConfig`) @@ -420,6 +421,7 @@ const SemanticPortal = props => { networkConfig={networkConfig} yasguiBaseUrl={yasguiBaseUrl} yasguiParams={yasguiParams} + sliderDuration={SLIDER_DURATION} /> </Grid> </Grid>