mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -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))
|
(= layout-align-items :stretch))
|
||||||
|
|
||||||
(defn reverse?
|
(defn reverse?
|
||||||
[{:keys [layout-flex-dir]}]
|
([objects id]
|
||||||
(or (= :row-reverse layout-flex-dir)
|
(reverse? (get objects id)))
|
||||||
(= :column-reverse layout-flex-dir)))
|
([{:keys [layout-flex-dir]}]
|
||||||
|
(or (= :row-reverse layout-flex-dir)
|
||||||
|
(= :column-reverse layout-flex-dir))))
|
||||||
|
|
||||||
(defn space-between?
|
(defn space-between?
|
||||||
[{:keys [layout-justify-content]}]
|
[{:keys [layout-justify-content]}]
|
||||||
|
|
|
@ -2013,6 +2013,7 @@
|
||||||
(d/index-by :prev-id))
|
(d/index-by :prev-id))
|
||||||
|
|
||||||
selected (:selected pdata)
|
selected (:selected pdata)
|
||||||
|
|
||||||
objects (:objects pdata)
|
objects (:objects pdata)
|
||||||
|
|
||||||
position (deref ms/mouse-position)
|
position (deref ms/mouse-position)
|
||||||
|
@ -2036,6 +2037,10 @@
|
||||||
index
|
index
|
||||||
0)
|
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))
|
objects (update-vals objects (partial process-shape file-id frame-id parent-id))
|
||||||
|
|
||||||
all-objects (merge page-objects objects)
|
all-objects (merge page-objects objects)
|
||||||
|
|
Loading…
Add table
Reference in a new issue