diff --git a/apps/class-solid/src/components/Analysis.tsx b/apps/class-solid/src/components/Analysis.tsx index 6685914..80b9c90 100644 --- a/apps/class-solid/src/components/Analysis.tsx +++ b/apps/class-solid/src/components/Analysis.tsx @@ -12,6 +12,7 @@ import { Switch, createEffect, createMemo, + createSignal, createUniqueId, } from "solid-js"; import { createStore } from "solid-js/store"; @@ -31,7 +32,7 @@ import { experiments, updateAnalysis, } from "~/lib/store"; -import { MdiCamera, MdiDelete } from "./icons"; +import { MdiCamera, MdiDelete, MdiImageFilterCenterFocus } from "./icons"; import { AxisBottom, AxisLeft, getNiceAxisLimits } from "./plots/Axes"; import { Chart, ChartContainer } from "./plots/ChartContainer"; import { Legend } from "./plots/Legend"; @@ -162,7 +163,7 @@ export function TimeSeriesPlot({ analysis }: { analysis: TimeseriesAnalysis }) { {/* TODO: get label for yVariable from model config */} - + @@ -269,7 +270,7 @@ export function VerticalProfilePlot({ toggles={toggles} onChange={toggleLine} /> - + @@ -394,7 +395,10 @@ export function ThermodynamicPlot({ analysis }: { analysis: SkewTAnalysis }) { return ( <> - [...skewTData(), ...observations()]} /> + [...skewTData(), ...observations()]} + /> {TimeSlider( () => analysis.time, uniqueTimes, @@ -443,6 +447,9 @@ async function takeScreenshot(event: MouseEvent, analyse: Analysis) { saveAs(file); } +// Emit a signal when plot reset button is pressed +export const [resetPlot, setResetPlot] = createSignal("", { equals: false }); + export function AnalysisCard(analysis: Analysis) { const id = createUniqueId(); return ( @@ -451,6 +458,9 @@ export function AnalysisCard(analysis: Analysis) { {/* TODO: make name & description editable */} {analysis.name}
+