From 7708236bb6246871d5ed5bfaf885879e360d2aeb Mon Sep 17 00:00:00 2001 From: Nisha Yerunkar Date: Mon, 5 Aug 2024 12:52:55 -0700 Subject: [PATCH] Add clarifying comment --- .../src/widgets/interactive-graphs/stateful-mafs-graph.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx b/packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx index f8501589a9..f72accc038 100644 --- a/packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx +++ b/packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx @@ -95,6 +95,9 @@ export const StatefulMafsGraph = React.forwardRef< ); }, [dispatch, xMinRange, xMaxRange, yMinRange, yMaxRange]); + // Update the graph whenever any of the following values changes. + // This is necessary to keep the graph previews in sync with the updated + // graph settings within the interative graph editor. const numSegments = graph.type === "segment" ? graph.numSegments : null; const numPoints = graph.type === "point" ? graph.numPoints : null; const numSides = graph.type === "polygon" ? graph.numSides : null;