diff --git a/packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx b/packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx index 1329499577..8a30d63907 100644 --- a/packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx +++ b/packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx @@ -91,6 +91,35 @@ export const WithMafs: StoryComponentType = { }, }; +/** + * Example of what the InteractiveGraphEditor experience is when using + * a Mafs-based InteractiveGraph to create Polygons. + */ +export const WithMafsPolygon: StoryComponentType = { + render: function Render() { + const reducer = (state, newState) => { + return { + ...state, + ...newState, + }; + }; + + const [state, dispatch] = React.useReducer(reducer, { + ...mafsOptions, + graph: {type: "polygon"}, + correct: { + type: "polygon", + numSides: 4, + showAngles: true, + showSides: true, + snapTo: "angles", + }, + }); + + return ; + }, +}; + /** * This InteractiveGraphEditor has locked points. * diff --git a/packages/perseus/src/widgets/__stories__/interactive-graph.stories.tsx b/packages/perseus/src/widgets/__stories__/interactive-graph.stories.tsx index 85c5ff2fc1..af2f114e7e 100644 --- a/packages/perseus/src/widgets/__stories__/interactive-graph.stories.tsx +++ b/packages/perseus/src/widgets/__stories__/interactive-graph.stories.tsx @@ -32,6 +32,7 @@ const mafsOptions = { flags: { mafs: { segment: true, + polygon: true, }, }, }, @@ -71,6 +72,10 @@ export const Polygon = (args: StoryArgs): React.ReactElement => ( ); +export const PolygonWithMafs = (args: StoryArgs): React.ReactElement => ( + +); + export const Ray = (args: StoryArgs): React.ReactElement => ( );