diff --git a/packages/element/src/binding.ts b/packages/element/src/binding.ts index bb6d1bc86f..f480d7fd9c 100644 --- a/packages/element/src/binding.ts +++ b/packages/element/src/binding.ts @@ -1131,7 +1131,7 @@ export const snapToMid = ( ); } else if ( element.type === "diamond" - ? nonRotated[0] >= x + width * (element.roundness ? 0.035 : 1) + ? nonRotated[0] >= x + width * (element.roundness ? 1 - 0.035 : 1) : nonRotated[0] >= x + width / 2 && nonRotated[1] > center[1] - verticalThrehsold && nonRotated[1] < center[1] + verticalThrehsold @@ -1144,7 +1144,7 @@ export const snapToMid = ( ); } else if ( element.type === "diamond" - ? nonRotated[1] >= y - height * (element.roundness ? 0.035 : 1) + ? nonRotated[1] >= y + height * (element.roundness ? 1 - 0.035 : 1) : nonRotated[1] >= y + height / 2 && nonRotated[0] > center[0] - horizontalThrehsold && nonRotated[0] < center[0] + horizontalThrehsold