{component.render(
flowContext,
typeof width == "number" ? width : component.width,
typeof height == "number"
? height
: component.height
)}
{
// component description
component instanceof
ProjectEditor.ActionComponentClass &&
!(
component instanceof
ProjectEditor.CommentActionComponentClass
) &&
component.description &&
flowContext.projectStore.uiStateStore
.showComponentDescriptions &&
(flowContext.projectStore.runtime
? flowContext.projectStore.runtime
.isDebuggerActive &&
!flowContext.frontFace
: true) && (
{component.description}
)
}
>
);
}
}
);
////////////////////////////////////////////////////////////////////////////////
export const ComponentCanvas = observer(
class ComponentCanvas extends React.Component<{
component: Page | Component;
draw: (ctx: CanvasRenderingContext2D) => void;
width: number;
height: number;
}> {
elRef = React.createRef