mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 16:12:17 +02:00
🐛 Fix move guides with board
This commit is contained in:
parent
8825e9f80b
commit
0e0ceaa9bf
4 changed files with 65 additions and 6 deletions
|
@ -79,20 +79,21 @@
|
|||
(rx/from (->> guides (mapv #(remove-guide %))))))))
|
||||
|
||||
(defmethod ptk/resolve ::move-frame-guides
|
||||
[_ ids]
|
||||
[_ args]
|
||||
(dm/assert!
|
||||
"expected a coll of uuids"
|
||||
(every? uuid? ids))
|
||||
(every? uuid? (:ids args)))
|
||||
(ptk/reify ::move-frame-guides
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
(let [ids (:ids args)
|
||||
object-modifiers (:modifiers args)
|
||||
|
||||
objects (wsh/lookup-page-objects state)
|
||||
|
||||
is-frame? (fn [id] (= :frame (get-in objects [id :type])))
|
||||
frame-ids? (into #{} (filter is-frame?) ids)
|
||||
|
||||
object-modifiers (get state :workspace-modifiers)
|
||||
|
||||
build-move-event
|
||||
(fn [guide]
|
||||
(let [frame (get objects (:frame-id guide))
|
||||
|
|
|
@ -497,7 +497,7 @@
|
|||
(if undo-transation?
|
||||
(rx/of (dwu/start-undo-transaction undo-id))
|
||||
(rx/empty))
|
||||
(rx/of (ptk/event ::dwg/move-frame-guides ids-with-children)
|
||||
(rx/of (ptk/event ::dwg/move-frame-guides {:ids ids-with-children :modifiers object-modifiers})
|
||||
(ptk/event ::dwcm/move-frame-comment-threads ids-with-children)
|
||||
(dwsh/update-shapes
|
||||
ids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue