🐛 Fix move guides with board

This commit is contained in:
Eva Marco 2024-06-10 13:04:30 +02:00
parent 8825e9f80b
commit 0e0ceaa9bf
4 changed files with 65 additions and 6 deletions

View file

@ -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))

View file

@ -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