From 349289b0361f447a76fbf1b913d13291e75f0e57 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Mon, 27 Nov 2023 19:27:25 +0200 Subject: [PATCH] fix align method --- src/renderer/element/handlers.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/element/handlers.cljs b/src/renderer/element/handlers.cljs index dd8c5338..dea3513f 100644 --- a/src/renderer/element/handlers.cljs +++ b/src/renderer/element/handlers.cljs @@ -313,9 +313,9 @@ ([db direction] (reduce #(align %1 %2 direction) db (selected db))) ([db el direction] - (let [bounds (tools/bounds el (elements db)) + (let [bounds (tools/adjusted-bounds el (elements db)) center (bounds/center bounds) - parent-bounds (tools/bounds (parent db el) (elements db)) + parent-bounds (tools/adjusted-bounds (parent db el) (elements db)) parent-center (bounds/center parent-bounds) [cx cy] (mat/sub parent-center center) [x1 y1 x2 y2] (mat/sub parent-bounds bounds)]