diff --git a/src/Components/SVG/Elements/Container.tsx b/src/Components/SVG/Elements/Container.tsx index bf56127..94a4924 100644 --- a/src/Components/SVG/Elements/Container.tsx +++ b/src/Components/SVG/Elements/Container.tsx @@ -14,7 +14,7 @@ export class Container extends React.Component { * @returns Render the container */ public render(): React.ReactNode { - const containersElements = this.props.model.children.map(child => new Container({ model: child } as IContainerProps).render()); + const containersElements = this.props.model.children.map(child => ); const xText = Number(this.props.model.properties.width) / 2; const yText = Number(this.props.model.properties.height) / 2; const transform = `translate(${Number(this.props.model.properties.x)}, ${Number(this.props.model.properties.y)})`; diff --git a/src/Components/SVG/Elements/DimensionLayer.tsx b/src/Components/SVG/Elements/DimensionLayer.tsx index 610177b..3c73f3a 100644 --- a/src/Components/SVG/Elements/DimensionLayer.tsx +++ b/src/Components/SVG/Elements/DimensionLayer.tsx @@ -22,15 +22,16 @@ const getDimensionsNodes = (root: ContainerModel): React.ReactNode[] => { const y = -(GAP * (getDepth(container) + 1)); const strokeWidth = 1; const text = width.toString(); - const dimension = new Dimension({ - id, - xStart, - xEnd, - y, - strokeWidth, - text - }); - dimensions.push(dimension.render()); + dimensions.push( + + ); } return dimensions; }; diff --git a/src/Components/SVG/SVG.tsx b/src/Components/SVG/SVG.tsx index c5404a2..4d8c301 100644 --- a/src/Components/SVG/SVG.tsx +++ b/src/Components/SVG/SVG.tsx @@ -43,9 +43,9 @@ export class SVG extends React.Component { let children: React.ReactNode | React.ReactNode[] = []; if (Array.isArray(this.props.children)) { - children = this.props.children.map(child => new Container({ model: child }).render()); + children = this.props.children.map(child => ); } else if (this.props.children !== null) { - children = new Container({ model: this.props.children }).render(); + children = ; } return (