Fix util calculation for transform

This commit is contained in:
drew08t
2023-11-02 22:54:43 -07:00
parent 37867cc632
commit 8515f4c295
+2 -2
View File
@@ -197,8 +197,8 @@ export const calculateCoordinates = (
const sourceVerticalCenter = sourceRect.top - parentRect.top + sourceRect.height / 2;
// Convert from connection coords to DOM coords
const x1 = sourceHorizontalCenter + (info.source.x * sourceRect.width) / 2 / transformScale;
const y1 = sourceVerticalCenter - (info.source.y * sourceRect.height) / 2 / transformScale;
const x1 = (sourceHorizontalCenter + (info.source.x * sourceRect.width) / 2) / transformScale;
const y1 = (sourceVerticalCenter - (info.source.y * sourceRect.height) / 2) / transformScale;
let x2: number;
let y2: number;