0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 15:09:10 -05:00

Merge pull request #2113 from andrewzhurov/3887-paste-frame-removes-all-guides

🐛 Fix paste frame removes all guides
This commit is contained in:
Andrey Antukh 2022-07-29 08:21:04 +02:00 committed by GitHub
commit f8fbb7abba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -425,11 +425,9 @@
(assoc :position (if (= (:axis %) :x) (assoc :position (if (= (:axis %) :x)
(+ (:position %) (- (:x new-frame) (:x frame))) (+ (:position %) (- (:x new-frame) (:x frame)))
(+ (:position %) (- (:y new-frame) (:y frame))))))))] (+ (:position %) (- (:y new-frame) (:y frame))))))))]
(cond-> g
(if-not (empty? new-guides) (not-empty new-guides)
(conj g (conj (into {} (map (juxt :id identity) new-guides))))))
(into {} (map (juxt :id identity) new-guides)))
{})))
guides guides
frames)] frames)]
(-> (pcb/with-page changes page) (-> (pcb/with-page changes page)