Skip to content

Free, simple, and intuitive online database diagram editor and SQL generator.

fix drawing line on just click

1ilit4447fa2f48d5
diff --git a/src/components/rect.jsx b/src/components/rect.jsx
index e33fb2a0..9966794e 100644
--- a/src/components/rect.jsx
+++ b/src/components/rect.jsx
@@ -211,11 +211,12 @@ const Rect = (props) => {
onMouseDown={(ev) => {
console.log("mouse down");
props.handleGripField(i);
- props.setLine((prev) => ({
- ...prev,
+ props.setLine({
startX: props.x + 15,
- startY: props.y + i * 36 + 40 + 18,
- }));
+ startY: props.y + i * 36 + 40 + 19,
+ endX: props.x + 15,
+ endY: props.y + i * 36 + 40 + 19,
+ });
}}
></button>
{e.name}