diff --git a/src/App.jsx b/src/App.jsx index 5569c93..df0503f 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -4,15 +4,16 @@ import "tldraw/tldraw.css"; export default function App() { const handleMount = (editor) => { const shapes = [ - { id: createShapeId("rectangle1"), type: "geo", x: 22, y: -47, props: { align: "middle", color: "black", dash: "draw", fill: "none", font: "draw", geo: "rectangle", w: 149, h: 90, labelColor: "black", scale: 1, size: "l", text: "Color" } }, - { id: createShapeId("rectangle2"), type: "geo", x: 124, y: 127, props: { align: "middle", color: "violet", dash: "draw", fill: "solid", font: "draw", geo: "rectangle", growY: 0, h: 75, labelColor: "black", scale: 1, size: "xl", text: "", url: "", verticalAlign: "middle", w: 100 } }, - { id: createShapeId("rectangle3"), type: "geo", x: 211, y: 88, props: { align: "middle", color: "orange", dash: "draw", fill: "solid", font: "draw", geo: "rectangle", growY: 0, h: 136, labelColor: "black", scale: 1, size: "xl", text: "", url: "", verticalAlign: "middle", w: 114 } }, - { id: createShapeId("arrow"), type: "arrow", x: 100, y: 100 } + { id: createShapeId("rectangle1"), type: "geo", x: 22, y: -47, props: { h: 90, w: 149, color: "black", dash: "draw", fill: "none", font: "draw", geo: "rectangle", size: "l", text: "Color" } }, + { id: createShapeId("rectangle2"), type: "geo", x: 124, y: 127, props: { h: 75, w: 100, color: "violet", dash: "draw", fill: "solid", font: "draw", geo: "rectangle", size: "xl" } }, + { id: createShapeId("rectangle3"), type: "geo", x: 211, y: 88, props: { h: 136, w: 114, color: "orange", dash: "draw", fill: "solid", font: "draw", geo: "rectangle", size: "xl" } }, + { id: createShapeId("rectangle4"), type: "geo", x: 265, y: 32, props: { h: 136, w: 114, color: "blue", dash: "draw", fill: "solid", font: "draw", geo: "rectangle", size: "xl" } }, + { id: createShapeId("arrow"), type: "arrow", x: 100, y: 100 } ]; const bindings = [ - { fromId: shapes[3].id, toId: shapes[0].id, type: "arrow", props: { terminal: "start", normalizedAnchor: { x: 0.5, y: 0.5 } } }, - { fromId: shapes[3].id, toId: shapes[1].id, type: "arrow", props: { terminal: "end", normalizedAnchor: { x: 0.5, y: 0.5 } } } + { fromId: shapes[4].id, toId: shapes[0].id, type: "arrow", props: { terminal: "start", normalizedAnchor: { x: 0.5, y: 0.5 } } }, + { fromId: shapes[4].id, toId: shapes[1].id, type: "arrow", props: { terminal: "end", normalizedAnchor: { x: 0.5, y: 0.5 } } } ]; editor.createShapes(shapes);