Ateş Göral 🔥🐐 @ates.dev · Nov 9

To overcome this issue, here's the second tweak. We reflect the bounding rectangle (the rectangle representing the image itself) along the axis of symmetry and then intersect the two bounding rectangles to derive a smaller bounding rectangle that keeps both corners within the image:

0 likes 1 replies

?

Replies

Ateş Göral 🔥🐐 · Nov 9

Once we have a moveEdge method that internally uses the moveCorner method, we put our withFrameOfReference wrapper to good use to implement all side drag handles: ``` export const moveTopEdge = withFrameOfReference(moveEdge, Math.PI / 2); ```