diff --git a/src/component/1d/multiAnalysis/AnalysisRange.tsx b/src/component/1d/multiAnalysis/AnalysisRange.tsx index 852271d5d2..8aabd8ad69 100644 --- a/src/component/1d/multiAnalysis/AnalysisRange.tsx +++ b/src/component/1d/multiAnalysis/AnalysisRange.tsx @@ -2,10 +2,9 @@ import { css } from '@emotion/react'; import { useCallback } from 'react'; -import { useGlobal } from '../../context/GlobalContext'; import { usePreferences } from '../../context/PreferencesContext'; import { useScaleChecked } from '../../context/ScaleContext'; -import Resizer from '../../elements/resizer/Resizer'; +import { ResizerWithScale } from '../../elements/ResizerWithScale'; import { useHighlight } from '../../highlight'; import { useResizerStatus } from '../../hooks/useResizerStatus'; @@ -55,7 +54,6 @@ function AnalysisRange({ }); const { scaleX } = useScaleChecked(); const { dispatch } = usePreferences(); - const { viewerRef } = useGlobal(); const resizeEndHandler = useCallback( (resized) => { @@ -71,18 +69,15 @@ function AnalysisRange({ [activeTab, columnKey, dispatch, scaleX], ); - const from = scaleX()(rangeData.from); - const to = scaleX()(rangeData.to); - const isResizeingActive = useResizerStatus('multipleSpectraAnalysis'); + const { from, to } = rangeData; + const isResizingActive = useResizerStatus('multipleSpectraAnalysis'); return ( - {({ x1, x2 }, isActive) => ( )} - + ); }