0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

Move artboards when duplicating

This commit is contained in:
Andrés Moya 2021-07-29 15:22:24 +02:00
parent 6a1ab4d73c
commit 574387acac

View file

@ -390,7 +390,12 @@
(let [page-id (:current-page-id state)
objects (wsh/lookup-page-objects state page-id)
selected (wsh/lookup-selected state)
delta (gpt/point 0 0)
delta (if (= (count selected) 1)
(let [obj (get objects (first selected))]
(if (= (:type obj) :frame)
(gpt/point (+ (:width obj) 50) 0)
(gpt/point 0 0)))
(gpt/point 0 0))
unames (dwc/retrieve-used-names objects)