Skip to content

Commit

Permalink
fix align method
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc committed Nov 27, 2023
1 parent 6bf3ae1 commit 349289b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/element/handlers.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 349289b

Please sign in to comment.