From cd3f8f0c4319e1ec24217ff9130ca848922b0343 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Mon, 4 Nov 2024 12:50:29 +0100 Subject: [PATCH] :sparkles: Add event for add-frame --- frontend/src/app/main/data/workspace/shapes.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/shapes.cljs b/frontend/src/app/main/data/workspace/shapes.cljs index 734d0488c..c489b07dd 100644 --- a/frontend/src/app/main/data/workspace/shapes.cljs +++ b/frontend/src/app/main/data/workspace/shapes.cljs @@ -18,6 +18,7 @@ [app.common.types.shape-tree :as ctst] [app.main.data.changes :as dch] [app.main.data.comments :as dc] + [app.main.data.events :as ev] [app.main.data.workspace.edition :as dwe] [app.main.data.workspace.selection :as dws] [app.main.data.workspace.state-helpers :as wsh] @@ -129,7 +130,9 @@ (dwu/commit-undo-transaction undo-id)) (when (cfh/text-shape? 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 [frame-id shapes]