0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-08 08:09:14 -05:00

Merge pull request #5248 from penpot/palba-add-event-for-add-frame

 Add event for add-frame
This commit is contained in:
Andrey Antukh 2024-11-04 14:25:19 +01:00 committed by GitHub
commit 24268bbf33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,7 @@
[app.common.types.shape-tree :as ctst] [app.common.types.shape-tree :as ctst]
[app.main.data.changes :as dch] [app.main.data.changes :as dch]
[app.main.data.comments :as dc] [app.main.data.comments :as dc]
[app.main.data.events :as ev]
[app.main.data.workspace.edition :as dwe] [app.main.data.workspace.edition :as dwe]
[app.main.data.workspace.selection :as dws] [app.main.data.workspace.selection :as dws]
[app.main.data.workspace.state-helpers :as wsh] [app.main.data.workspace.state-helpers :as wsh]
@ -129,7 +130,9 @@
(dwu/commit-undo-transaction undo-id)) (dwu/commit-undo-transaction undo-id))
(when (cfh/text-shape? shape) (when (cfh/text-shape? shape)
(->> (rx/of (dwe/start-edition-mode (:id shape))) (->> (rx/of (dwe/start-edition-mode (:id shape)))
(rx/observe-on :async))))))))) (rx/observe-on :async)))
(when (cfh/frame-shape? shape)
(rx/of (ptk/event ::ev/event {::ev/name "add-frame"})))))))))
(defn move-shapes-into-frame (defn move-shapes-into-frame
[frame-id shapes] [frame-id shapes]