1
0
Fork 0

refactor: The Draft component is renamed to Render. Draft is deprecated

This commit is contained in:
Joost De Cock 2019-11-01 17:34:54 +01:00
parent 7bc22909b7
commit 1af55d9e22
24 changed files with 8 additions and 6 deletions

View file

@ -1,37 +0,0 @@
import React from "react";
import Markers from "./Markers";
import Snippets from "./Snippets";
import Grid from "./Grid";
const Defs = props => {
let paperlessGrids = null;
if (props.paperless) {
paperlessGrids = [];
for (let p in props.parts) {
let anchor = { x: 0, y: 0 };
if (typeof props.parts[p].points.gridAnchor !== "undefined")
anchor = props.parts[p].points.gridAnchor;
else if (typeof props.parts[p].points.anchor !== "undefined")
anchor = props.parts[p].points.anchor;
paperlessGrids.push(
<pattern
id={"grid-" + p}
key={"grid-" + p}
xlinkHref="#grid"
x={anchor.x}
y={anchor.y}
/>
);
}
}
return (
<defs>
<Markers />
<Snippets />
<Grid units={props.units} />
{paperlessGrids}
</defs>
);
};
export default Defs;