Skip to content

Commit

Permalink
streamline code
Browse files Browse the repository at this point in the history
  • Loading branch information
nishasy committed Aug 22, 2024
1 parent b33b216 commit 2fbb312
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,10 @@ import {lockedFigureColors, type LockedLabelType} from "../../../perseus-types";
import {pointToPixel} from "../graphs/use-transform";
import useGraphConfig from "../reducer/use-graph-config";

import type {GraphDimensions} from "../types";

export default function LockedLabel(props: LockedLabelType) {
const {coord, text, color, size} = props;
const {range, width, height} = useGraphConfig();

const graphInfo: GraphDimensions = {
range,
width,
height,
};

const [x, y] = pointToPixel(coord, graphInfo);
const [x, y] = pointToPixel(coord, useGraphConfig());

const {TeX} = getDependencies();

Expand Down

0 comments on commit 2fbb312

Please sign in to comment.