Skip to content

Commit 3e1656c

Browse files
committed
feat: update visualization components to improve fullscreen handling
1 parent 60b2b6b commit 3e1656c

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

src/components/visualization/NeuralDynamicsPanel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ export const NeuralDynamicsPanel = memo(function NeuralDynamicsPanel({
448448
return (
449449
<>
450450
{/* Normal view */}
451-
<div className={`flex flex-col gap-2 ${isFullscreen ? 'hidden' : ''}`}>
451+
{!isFullscreen && (
452+
<div className="flex flex-col gap-2">
452453
{showControls && (
453454
<div className="flex items-center justify-between">
454455
<h3 className="text-xs font-semibold text-gray-400 uppercase tracking-wider">
@@ -465,6 +466,7 @@ export const NeuralDynamicsPanel = memo(function NeuralDynamicsPanel({
465466
{statsContent}
466467
</div>
467468
</div>
469+
)}
468470

469471
{/* Fullscreen view */}
470472
<AnimatePresence>

src/components/visualization/NeuronCorrelationMatrix.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ export const NeuronCorrelationMatrix = memo(function NeuronCorrelationMatrix({
429429

430430
return (
431431
<>
432-
<div className={`flex flex-col gap-2 ${isFullscreen ? 'hidden' : ''}`}>
432+
{!isFullscreen && (
433+
<div className="flex flex-col gap-2">
433434
<div className="flex items-center justify-between">
434435
<h3 className="text-xs font-semibold text-gray-400 uppercase tracking-wider">
435436
Correlation Matrix
@@ -464,6 +465,7 @@ export const NeuronCorrelationMatrix = memo(function NeuronCorrelationMatrix({
464465
<StatsDisplay />
465466
</div>
466467
</div>
468+
)}
467469

468470
{/* Fullscreen */}
469471
<AnimatePresence>

src/components/visualization/PopulationDynamics.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ export const PopulationDynamics = memo(function PopulationDynamics({
364364

365365
return (
366366
<>
367-
<div className={`flex flex-col gap-2 ${isFullscreen ? 'hidden' : ''}`}>
367+
{!isFullscreen && (
368+
<div className="flex flex-col gap-2">
368369
<div className="flex items-center justify-between">
369370
<h3 className="text-xs font-semibold text-gray-400 uppercase tracking-wider">
370371
Population Dynamics
@@ -396,6 +397,7 @@ export const PopulationDynamics = memo(function PopulationDynamics({
396397
{statsContent}
397398
</div>
398399
</div>
400+
)}
399401

400402
{/* Fullscreen */}
401403
<AnimatePresence>

src/components/visualization/SpectralPowerPanel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ export const SpectralPowerPanel = memo(function SpectralPowerPanel({
377377

378378
return (
379379
<>
380-
<div className={`flex flex-col gap-3 ${isFullscreen ? 'hidden' : ''}`}>
380+
{!isFullscreen && (
381+
<div className="flex flex-col gap-3">
381382
<div className="flex items-center justify-between">
382383
<h3 className="text-xs font-semibold text-gray-400 uppercase tracking-wider">
383384
Spectral Analysis
@@ -427,6 +428,7 @@ export const SpectralPowerPanel = memo(function SpectralPowerPanel({
427428
</span>
428429
</div>
429430
</div>
431+
)}
430432

431433
{/* Fullscreen */}
432434
<AnimatePresence>

src/components/visualization/SpikeRasterPlot.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ export const SpikeRasterPlot = memo(function SpikeRasterPlot({
448448
return (
449449
<>
450450
{/* Normal view */}
451-
<div className={`flex flex-col gap-2 ${isFullscreen ? 'hidden' : ''}`}>
451+
{!isFullscreen && (
452+
<div className="flex flex-col gap-2">
452453
<div className="flex items-center justify-between">
453454
<h3 className="text-xs font-semibold text-gray-400 uppercase tracking-wider">
454455
Spike Raster
@@ -463,6 +464,7 @@ export const SpikeRasterPlot = memo(function SpikeRasterPlot({
463464
{statsContent}
464465
</div>
465466
</div>
467+
)}
466468

467469
{/* Fullscreen view */}
468470
<AnimatePresence>

0 commit comments

Comments
 (0)