Skip to content

Commit

Permalink
Fix #30
Browse files Browse the repository at this point in the history
  • Loading branch information
ShukantPal committed Jul 17, 2021
1 parent 0d2ea4d commit 8e703d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/transformer/src/TransformerWireframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8e703d5

Please sign in to comment.