diff --git a/src/services/rectangle.js b/src/services/rectangle.js index a433046..c45c13e 100644 --- a/src/services/rectangle.js +++ b/src/services/rectangle.js @@ -9,7 +9,7 @@ export function makeRectangle (x, y, width, height) { export function crop ({ x, y, width: w, height: h }) { if (w < h) { - return makeRectangle((h - w) / 2, y, h, h) + return makeRectangle(x, (h - w) / 2, w, w) } else if (w > h) { return makeRectangle((w - h) / 2, y, h, h) } else {