0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 17:18:21 -05:00

🐛 Fix align.cljc lint

This commit is contained in:
Alejandro Alonso 2023-06-06 14:03:08 +02:00
parent d0c68dbc23
commit c89f2fc627

View file

@ -84,9 +84,8 @@
; Each shape wrapped in its own rectangle
wrapped-shapes (map #(gsh/selection-rect [%]) sorted-shapes)
; The total space between shapes
space (reduce - (size wrapper-rect) (map size wrapped-shapes))]
(let [unit-space (/ space (- (count wrapped-shapes) 1))
space (reduce - (size wrapper-rect) (map size wrapped-shapes))
unit-space (/ space (- (count wrapped-shapes) 1))
; Calculate the distance we need to move each shape.
; The new position of each one is the position of the
; previous one plus its size plus the unit space.
@ -105,7 +104,7 @@
(conj deltas delta)))))]
(mapcat #(recursive-move %1 {coord %2 other-coord 0} objects)
sorted-shapes deltas))))
sorted-shapes deltas)))
;; Adjust to viewport