import { forwardRef, useRef } from 'react';
import { Group, Rect, Space, Align, Ref, SVG, Text } from './main';
import { Col } from './components/Col';
const Variable = forwardRef(function _Variable({ data }: { data: any }, ref) {
const { pointObject, name, value, opId } = data;
// References
const textRef = useRef(null);
const valueRef = useRef(null);
const boxRef = useRef(null);
const boxRefBorderLeft = useRef(null);
const boxRefBorderBottom = useRef(null);
const variableRef = useRef(null);
// Declares font used in Python Tutor Diagrams
const fontFamily = 'verdana, arial, helvetica, sans-serif';
return (
{/* Creates frame of Variable component (text label & box for value) */}
{/* Creates left and bottom edge borders */}
{/* Creates text labels of variable */}
{/* Align text and border components to variable frame */}
);
});
export const GlobalFrame = forwardRef(function _GlobalFrame({ variables, opId }: { variables: any; opId: any }, ref) {
// References
const frame = useRef(null);
const opIdLabel = useRef(null);
const frameVariables = useRef(null);
const frameBorder = useRef(null);
// Font declaration
const fontFamily = 'Andale mono, monospace';
return (
{/* Global Frame and relevant text */}
{/* TODO: this Space and Align should be a Col, but Col overwrites *all* placeable positions
even though opIdLabel has already been placed */}
{variables.map((variable: any) => (
))}
);
});