From 6519b5c3ba1adfe07b5633a9d9173a645b8f5a02 Mon Sep 17 00:00:00 2001 From: Andre Henn Date: Thu, 23 Jan 2025 15:45:48 +0100 Subject: [PATCH] feat: support minutes in autoplay and seperate speed from unit --- src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.less | 4 ---- src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.tsx | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.less b/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.less index 4dc2011e9..460acaca8 100644 --- a/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.less +++ b/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.less @@ -55,10 +55,6 @@ flex: 0 0 auto; } - .speed-picker { - margin-right: 20px; - } - .ant-select-selection { background-color: white; width: 150px; diff --git a/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.tsx b/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.tsx index 0695b9823..0479147b5 100644 --- a/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.tsx +++ b/src/Panel/TimeLayerSliderPanel/TimeLayerSliderPanel.tsx @@ -31,13 +31,14 @@ export type TimeLayerSliderPanelTooltips = { dataRange: string; days: string; hours: string; + minutes: string; months: string; setToMostRecent: string; weeks: string; years: string; }; -export type PlaybackSpeedUnit = 'hours' | 'days' | 'weeks' | 'months' | 'years'; +export type PlaybackSpeedUnit = 'minute' | 'hours' | 'days' | 'weeks' | 'months' | 'years'; export type TimeLayerSliderPanelProps = { autoPlaySpeedOptions?: number[]; @@ -59,6 +60,7 @@ export const TimeLayerSliderPanel: React.FC = ({ timeAwareLayers = [], tooltips = { setToMostRecent: 'Set to most recent date', + minutes: 'Minutes', hours: 'Hours', days: 'Days', weeks: 'Weeks', @@ -402,14 +404,16 @@ export const TimeLayerSliderPanel: React.FC = ({ > {speedOptions} + x className={extraCls + ' speed-picker'} - defaultValue={'hours'} + defaultValue={'minute'} dropdownStyle={{ minWidth: '100px' }} onChange={onPlaybackUnitChange} popupMatchSelectWidth={false} value={playbackSpeedUnit} > +