Skip to content

Commit

Permalink
respond to Ben's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
handeyeco committed Jan 17, 2025
1 parent 6f757a9 commit 58ebb49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/perseus/src/widgets/grapher/grapher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
defaultPlotProps,
getGridAndSnapSteps,
maybePointsFromNormalized,
movableToGraphieMovable,
movableTypeToComponent,
typeToButton,
} from "./util";

Expand Down Expand Up @@ -138,7 +138,7 @@ class FunctionGrapher extends React.Component<FunctionGrapherProps> {
}

const functionProps = model.getPropsForCoeffs(coeffs, xRange);
const Movable = movableToGraphieMovable[model.movable];
const Movable = movableTypeToComponent[model.movable];
return (
<Movable
{...functionProps}
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/widgets/grapher/util.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {FunctionTypeMappingKeys} from "@khanacademy/perseus-core";
type MovableMap = {
[K in keyof typeof GrapherUtil.MOVABLES]: any;
};
export const movableToGraphieMovable: MovableMap = {
export const movableTypeToComponent: MovableMap = {
// @ts-expect-error - TS2339 - Property 'Plot' does not exist on type 'typeof Graphie'.
PLOT: Graphie.Plot,
// @ts-expect-error - TS2339 - Property 'Parabola' does not exist on type 'typeof Graphie'.
Expand Down

0 comments on commit 58ebb49

Please sign in to comment.