mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
🐛 Fix problem with paste order
This commit is contained in:
parent
420178e620
commit
0935390761
2 changed files with 10 additions and 3 deletions
|
@ -495,9 +495,11 @@
|
|||
(= layout-align-items :stretch))
|
||||
|
||||
(defn reverse?
|
||||
[{:keys [layout-flex-dir]}]
|
||||
(or (= :row-reverse layout-flex-dir)
|
||||
(= :column-reverse layout-flex-dir)))
|
||||
([objects id]
|
||||
(reverse? (get objects id)))
|
||||
([{:keys [layout-flex-dir]}]
|
||||
(or (= :row-reverse layout-flex-dir)
|
||||
(= :column-reverse layout-flex-dir))))
|
||||
|
||||
(defn space-between?
|
||||
[{:keys [layout-justify-content]}]
|
||||
|
|
|
@ -2013,6 +2013,7 @@
|
|||
(d/index-by :prev-id))
|
||||
|
||||
selected (:selected pdata)
|
||||
|
||||
objects (:objects pdata)
|
||||
|
||||
position (deref ms/mouse-position)
|
||||
|
@ -2036,6 +2037,10 @@
|
|||
index
|
||||
0)
|
||||
|
||||
selected (if (and (ctl/flex-layout? page-objects parent-id) (not (ctl/reverse? page-objects parent-id)))
|
||||
(into (d/ordered-set) (reverse selected))
|
||||
selected)
|
||||
|
||||
objects (update-vals objects (partial process-shape file-id frame-id parent-id))
|
||||
|
||||
all-objects (merge page-objects objects)
|
||||
|
|
Loading…
Reference in a new issue