diff --git a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx index f3ef434..afbe8da 100644 --- a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx +++ b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx @@ -23,8 +23,6 @@ import { ExtractionSimulationDisplay } from './ExtractionSimulationDisplay'; import { ExtractionSimulationTooltip } from './ExtractionSimulationTooltip'; import { ProductionNode } from './ExtractionSimulation'; import { Collapse, Box, Stack } from "@mui/material"; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; -import ExpandLessIcon from '@mui/icons-material/ExpandLess'; const Transition = forwardRef(function Transition( props: TransitionProps & { @@ -159,9 +157,22 @@ export const PlanetTableRow = ({ <> { + // Only trigger if clicking a cell with the clickable-cell class + if (!(e.target as HTMLElement).closest('.clickable-cell')) return; + if (extractors.length > 0) { + setSimulationOpen(!simulationOpen); + } + }} > - + - {planet.upgrade_level} - + {planet.upgrade_level} +
{extractors.map((e, idx) => { return ( @@ -259,7 +270,7 @@ export const PlanetTableRow = ({ })}
- +
{Array.from(localProduction).map((schematic, idx) => { return ( @@ -273,7 +284,7 @@ export const PlanetTableRow = ({ })}
- +
{localImports.map((i) => ( - +
{localExports.map((exports) => ( - +
{localExports.map((exports) => ( - +
- +
{storageFacilities .sort((a, b) => { @@ -401,7 +412,7 @@ export const PlanetTableRow = ({ })}
- + Configure Planet - {extractors.length > 0 && ( - { - setSimulationOpen(!simulationOpen); - handleMenuClose(); - }}> - {simulationOpen ? 'Hide Extraction Simulation' : 'Show Extraction Simulation'} - - )} { handle3DrenderOpen(); handleMenuClose(); @@ -441,7 +444,7 @@ export const PlanetTableRow = ({ - +