fix: 모델 패널 위치 상향 — 재생 컨트롤러와 겹침 해소
CorrelationPanel: historyData prop 제거 → useGearReplayStore 직접 구독 재생 활성 시 bottom: 80→100 (컨트롤러 높이 60px 확보) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
부모
87d1b31ef3
커밋
4cf29521a9
@ -1,9 +1,9 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import type { GearCorrelationItem, CorrelationVesselTrack } from '../../services/vesselAnalysis';
|
import type { GearCorrelationItem, CorrelationVesselTrack } from '../../services/vesselAnalysis';
|
||||||
import type { UseGroupPolygonsResult } from '../../hooks/useGroupPolygons';
|
import type { UseGroupPolygonsResult } from '../../hooks/useGroupPolygons';
|
||||||
import type { HistoryFrame } from './fleetClusterTypes';
|
|
||||||
import { FONT_MONO } from '../../styles/fonts';
|
import { FONT_MONO } from '../../styles/fonts';
|
||||||
import { MODEL_ORDER, MODEL_COLORS, MODEL_DESC } from './fleetClusterConstants';
|
import { MODEL_ORDER, MODEL_COLORS, MODEL_DESC } from './fleetClusterConstants';
|
||||||
|
import { useGearReplayStore } from '../../stores/gearReplayStore';
|
||||||
|
|
||||||
interface CorrelationPanelProps {
|
interface CorrelationPanelProps {
|
||||||
selectedGearGroup: string;
|
selectedGearGroup: string;
|
||||||
@ -15,8 +15,6 @@ interface CorrelationPanelProps {
|
|||||||
enabledModels: Set<string>;
|
enabledModels: Set<string>;
|
||||||
enabledVessels: Set<string>;
|
enabledVessels: Set<string>;
|
||||||
correlationLoading: boolean;
|
correlationLoading: boolean;
|
||||||
historyData: HistoryFrame[] | null;
|
|
||||||
effectiveSnapIdx: number;
|
|
||||||
hoveredTarget: { mmsi: string; model: string } | null;
|
hoveredTarget: { mmsi: string; model: string } | null;
|
||||||
onEnabledModelsChange: (updater: (prev: Set<string>) => Set<string>) => void;
|
onEnabledModelsChange: (updater: (prev: Set<string>) => Set<string>) => void;
|
||||||
onEnabledVesselsChange: (updater: (prev: Set<string>) => Set<string>) => void;
|
onEnabledVesselsChange: (updater: (prev: Set<string>) => Set<string>) => void;
|
||||||
@ -36,12 +34,13 @@ const CorrelationPanel = ({
|
|||||||
enabledModels,
|
enabledModels,
|
||||||
enabledVessels,
|
enabledVessels,
|
||||||
correlationLoading,
|
correlationLoading,
|
||||||
historyData,
|
|
||||||
hoveredTarget,
|
hoveredTarget,
|
||||||
onEnabledModelsChange,
|
onEnabledModelsChange,
|
||||||
onEnabledVesselsChange,
|
onEnabledVesselsChange,
|
||||||
onHoveredTargetChange,
|
onHoveredTargetChange,
|
||||||
}: CorrelationPanelProps) => {
|
}: CorrelationPanelProps) => {
|
||||||
|
const historyActive = useGearReplayStore(s => s.historyFrames.length > 0);
|
||||||
|
|
||||||
// Local tooltip state
|
// Local tooltip state
|
||||||
const [hoveredModelTip, setHoveredModelTip] = useState<string | null>(null);
|
const [hoveredModelTip, setHoveredModelTip] = useState<string | null>(null);
|
||||||
const [pinnedModelTip, setPinnedModelTip] = useState<string | null>(null);
|
const [pinnedModelTip, setPinnedModelTip] = useState<string | null>(null);
|
||||||
@ -213,7 +212,7 @@ const CorrelationPanel = ({
|
|||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
bottom: historyData ? 80 : 20,
|
bottom: historyActive ? 100 : 20,
|
||||||
left: 'calc(50% - 275px)',
|
left: 'calc(50% - 275px)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
gap: 6,
|
gap: 6,
|
||||||
|
|||||||
@ -429,8 +429,6 @@ export function FleetClusterLayer({ ships, analysisMap: analysisMapProp, onShipS
|
|||||||
enabledModels={enabledModels}
|
enabledModels={enabledModels}
|
||||||
enabledVessels={enabledVessels}
|
enabledVessels={enabledVessels}
|
||||||
correlationLoading={correlationLoading}
|
correlationLoading={correlationLoading}
|
||||||
historyData={null}
|
|
||||||
effectiveSnapIdx={-1}
|
|
||||||
hoveredTarget={hoveredTarget}
|
hoveredTarget={hoveredTarget}
|
||||||
onEnabledModelsChange={(updater) => setEnabledModels(updater)}
|
onEnabledModelsChange={(updater) => setEnabledModels(updater)}
|
||||||
onEnabledVesselsChange={(updater) => setEnabledVessels(updater)}
|
onEnabledVesselsChange={(updater) => setEnabledVessels(updater)}
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user