Skip to content

Commit fc6f0de

Browse files
committed
fix package
1 parent 11b4844 commit fc6f0de

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/components/LightCurvePlot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { xKeyMap } from '@/utils/xKeyMap';
1010
import { createAnnotation, ModalInfo } from '@/utils/annotationUtils';
1111
import { RenderTooltip } from '@/constants/hoverUtils';
1212
import { digitize, weightedAvg } from '@/libs/mathUtils';
13-
import { PlotTrace, PlotLayout, AveragePointCustomData } from '@/types/PlotTypes';
13+
import { PlotTrace, PlotDatumWithBBox, PlotLayout, AveragePointCustomData } from '@/types/PlotTypes';
1414
import { ImageModal } from '@/components/ImageModal';
1515
import RawDataPlotPanel from '@/components/RawDataPlotPanel';
1616
import { Trash2 } from 'lucide-react';
@@ -485,7 +485,7 @@ export default function LightCurvePlot() {
485485

486486
function handleAveragePointClick(
487487
figure: { data: PlotTrace[] },
488-
pt: Plotly.PlotDatum
488+
pt: PlotDatumWithBBox
489489
): void {
490490
const cd: AveragePointCustomData = (pt.customdata as unknown as AveragePointCustomData) ?? {};
491491
if (pt.bbox) {

src/types/PlotTypes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,13 @@ export interface AveragePointCustomData {
6060
avgErr?: number;
6161
[key: string]: unknown;
6262
}
63+
64+
export interface PlotDatumWithBBox extends Plotly.PlotDatum {
65+
bbox?: {
66+
x0: number;
67+
x1: number;
68+
y0: number;
69+
y1: number;
70+
};
71+
fullData?: PlotTrace;
72+
}

0 commit comments

Comments
 (0)