Implement export as SVG #14

Merged
Siklos merged 3 commits from dev.exportSVG into dev 2022-08-05 12:11:00 -04:00
Showing only changes of commit 2dcdf769f1 - Show all commits

View file

@ -18,7 +18,6 @@ interface ISVGState {
export class SVG extends React.PureComponent<ISVGProps> { export class SVG extends React.PureComponent<ISVGProps> {
public state: ISVGState; public state: ISVGState;
public svg: React.RefObject<SVGSVGElement>;
constructor(props: ISVGProps) { constructor(props: ISVGProps) {
super(props); super(props);
@ -29,7 +28,6 @@ export class SVG extends React.PureComponent<ISVGProps> {
} as Value, } as Value,
tool: TOOL_PAN tool: TOOL_PAN
}; };
this.svg = React.createRef<SVGSVGElement>();
} }
render() { render() {
@ -63,7 +61,7 @@ export class SVG extends React.PureComponent<ISVGProps> {
height: 120 height: 120
}} }}
> >
<svg ref={this.svg} {...properties}> <svg {...properties}>
{ children } { children }
<Selector selected={this.props.selected} /> <Selector selected={this.props.selected} />
</svg> </svg>