From 6674135c74238a1127bdb77e569453df4c2403c2 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Tue, 22 Mar 2022 19:21:04 +0100 Subject: [PATCH] :bug: Revert d2590c7: :bug: [Prototype] Prototype mode should not allow edits --- frontend/src/app/main/data/workspace.cljs | 8 ++------ frontend/src/app/main/data/workspace/interactions.cljs | 9 --------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index a5c387a04..eda428e30 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -556,13 +556,9 @@ ptk/WatchEvent (watch [_ state _] (let [selected (wsh/lookup-selected state) - hover-guides (get-in state [:workspace-guides :hover]) - options-mode (get-in state [:workspace-global :options-mode])] + hover-guides (get-in state [:workspace-guides :hover])] (cond - (and (= options-mode :prototype) (d/not-empty? selected)) - (rx/of (dwi/remove-interactions selected)) - - (and (= options-mode :design) (d/not-empty? selected)) + (d/not-empty? selected) (rx/of (dwc/delete-shapes selected) (dws/deselect-all)) diff --git a/frontend/src/app/main/data/workspace/interactions.cljs b/frontend/src/app/main/data/workspace/interactions.cljs index 654507ef7..d44a55a77 100644 --- a/frontend/src/app/main/data/workspace/interactions.cljs +++ b/frontend/src/app/main/data/workspace/interactions.cljs @@ -139,15 +139,6 @@ (update shape :interactions csi/remove-interaction index))))))) -(defn remove-interactions - [ids] - (ptk/reify ::remove-interactions - ptk/WatchEvent - (watch [_ _ _] - (rx/of (dch/update-shapes ids - (fn [shape] - (assoc shape :interactions []))))))) - (defn update-interaction [shape index update-fn] (ptk/reify ::update-interaction