mirror of
https://github.com/penpot/penpot.git
synced 2025-02-11 01:28:30 -05:00
🐛 Fix align.cljc lint
This commit is contained in:
parent
d0c68dbc23
commit
c89f2fc627
1 changed files with 17 additions and 18 deletions
|
@ -84,9 +84,8 @@
|
||||||
; Each shape wrapped in its own rectangle
|
; Each shape wrapped in its own rectangle
|
||||||
wrapped-shapes (map #(gsh/selection-rect [%]) sorted-shapes)
|
wrapped-shapes (map #(gsh/selection-rect [%]) sorted-shapes)
|
||||||
; The total space between shapes
|
; The total space between shapes
|
||||||
space (reduce - (size wrapper-rect) (map size wrapped-shapes))]
|
space (reduce - (size wrapper-rect) (map size wrapped-shapes))
|
||||||
|
unit-space (/ space (- (count wrapped-shapes) 1))
|
||||||
(let [unit-space (/ space (- (count wrapped-shapes) 1))
|
|
||||||
; Calculate the distance we need to move each shape.
|
; Calculate the distance we need to move each shape.
|
||||||
; The new position of each one is the position of the
|
; The new position of each one is the position of the
|
||||||
; previous one plus its size plus the unit space.
|
; previous one plus its size plus the unit space.
|
||||||
|
@ -105,7 +104,7 @@
|
||||||
(conj deltas delta)))))]
|
(conj deltas delta)))))]
|
||||||
|
|
||||||
(mapcat #(recursive-move %1 {coord %2 other-coord 0} objects)
|
(mapcat #(recursive-move %1 {coord %2 other-coord 0} objects)
|
||||||
sorted-shapes deltas))))
|
sorted-shapes deltas)))
|
||||||
|
|
||||||
;; Adjust to viewport
|
;; Adjust to viewport
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue