Skip to content

Commit 99e3b44

Browse files
authored
Merge pull request #1536 from Caltech-IPAC/FIREFLY-1455-chart-regression
FIREFLY-1455: fixed ChartPanel regression issues
2 parents c71f5ef + 3d76217 commit 99e3b44

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/firefly/js/charts/ui/ChartPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const ResizableChartAreaInternal = React.memo((props) => {
7474
if (!knownSize) return <div/>;
7575

7676
return (
77-
<Stack id='chart-resizer' flexGrow={1} position='relative' overflow='hidden' height={1} width={1}>
77+
<Stack id='chart-resizer' height={1} width={1} sx={{flexGrow:1, position:'absolute', overflow:'hidden', inset:0}}>
7878
{errors.length || isUndefined(Chart) ?
7979
<ErrorPanel errors={errors}/> :
8080
<Chart {...Object.assign({}, props, {widthPx, heightPx})}/>
@@ -105,7 +105,7 @@ const ChartArea = (props) => {
105105
const deletable = isUndefined(get(chartData, 'deletable')) ? deletableProp : get(chartData, 'deletable');
106106
const errors = getErrors(chartId);
107107
return (
108-
<Stack id='chart-area' flexGrow={1}>
108+
<Stack id='chart-area' flexGrow={1} sx={{position:'relative'}}>
109109
<ResizableChartArea
110110
{...Object.assign({}, props, {errors})} />
111111
{glass && <Stack flexGrow={1} sx={{backgroundColor:'transparent'}}/>}

src/firefly/js/charts/ui/PlotlyChartArea.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export function PlotlyChartArea({chartId, widthPx, heightPx, thumbnail}) {
2424
const {fireflyData} = getChartData(chartId);
2525
handleTableSourceConnections({chartId, data, fireflyData});
2626
return () => {
27-
clearChartConn({chartId});
27+
if (getChartData(chartId)?.mounted === 0) {
28+
clearChartConn({chartId});
29+
}
2830
};
2931
}, [chartId]);
3032

0 commit comments

Comments
 (0)