Enhance PlotHistoricalSession component to update both central time and visible range on pan event; adjust background color opacity for better visibility. Update system state to include 'DAR' dataset and add PlotJuggler path.

This commit is contained in:
Miguel 2025-08-25 14:39:58 +02:00
parent 366cb638e4
commit 250748446f
3 changed files with 16726 additions and 13799 deletions

File diff suppressed because it is too large Load Diff

View File

@ -415,13 +415,15 @@ export default function PlotHistoricalSession({
const newStart = new Date(start)
const newEnd = new Date(end)
// Calculate new central time (keep same range)
// Calculate new central time AND update range based on actual visible range
const newCentralTime = new Date((newStart.getTime() + newEnd.getTime()) / 2)
const actualVisibleRangeSeconds = Math.floor((newEnd.getTime() - newStart.getTime()) / 1000)
console.log('📊 Pan: New central time:', newCentralTime)
console.log('📊 Pan: New central time:', newCentralTime, 'Actual visible range:', actualVisibleRangeSeconds, 'seconds')
// Use debounced update (only central time, no range change)
debouncedTimeChange(newCentralTime)
// IMPORTANT: Update both central time AND range to match what's actually visible
// This ensures that when data is reloaded, it uses the correct visible range
debouncedTimeChange(newCentralTime, actualVisibleRangeSeconds)
}
// Handle time change from TimePointSelector
@ -442,7 +444,7 @@ export default function PlotHistoricalSession({
const smallTextColor = useColorModeValue('gray.400', 'gray.500')
// Additional color mode values for conditional elements
const whiteAlphaBg = useColorModeValue('whiteAlpha.800', 'blackAlpha.800')
const whiteAlphaBg = useColorModeValue('whiteAlpha.400', 'blackAlpha.400')
const inputBg = useColorModeValue('white', 'gray.700')
const inputHoverBg = useColorModeValue('gray.50', 'gray.600')
const editFieldColor = useColorModeValue('gray.900', 'gray.100')

View File

@ -3,11 +3,12 @@
"should_connect": true,
"should_stream": false,
"active_datasets": [
"DAR",
"Test",
"DAR",
"Fast"
]
},
"auto_recovery_enabled": true,
"last_update": "2025-08-22T17:31:16.229568"
"last_update": "2025-08-25T12:39:01.367655",
"plotjuggler_path": "C:\\Program Files\\PlotJuggler\\plotjuggler.exe"
}