From 8e703d5b97fc57addd7a52b24eb14e2bad5157bd Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Sat, 17 Jul 2021 16:48:34 -0400 Subject: [PATCH] Fix #30 --- packages/transformer/src/TransformerWireframe.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/transformer/src/TransformerWireframe.ts b/packages/transformer/src/TransformerWireframe.ts index b22381e2..9c499b90 100644 --- a/packages/transformer/src/TransformerWireframe.ts +++ b/packages/transformer/src/TransformerWireframe.ts @@ -158,10 +158,10 @@ export class TransformerWireframe extends Graphics if (boxScalingEnabled) { - const topProximity = distanceToLine(x, y, topLeft, topRight); - const leftProximity = distanceToLine(x, y, topLeft, bottomLeft); - const rightProximity = distanceToLine(x, y, topRight, bottomRight); - const bottomProximity = distanceToLine(x, y, bottomLeft, bottomRight); + const topProximity = distanceToLine(x, y, topLeft, topRight) * projectionTransform.d; + const leftProximity = distanceToLine(x, y, topLeft, bottomLeft) * projectionTransform.a; + const rightProximity = distanceToLine(x, y, topRight, bottomRight) * projectionTransform.a; + const bottomProximity = distanceToLine(x, y, bottomLeft, bottomRight) * projectionTransform.d; const minProximity = Math.min(topProximity, leftProximity, rightProximity, bottomProximity); if (minProximity < boxScalingTolerance)