mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 20:39:09 -05:00
🐛 Revert d2590c7
: 🐛 [Prototype] Prototype mode should not allow edits
This commit is contained in:
parent
a4fbc050cc
commit
6674135c74
2 changed files with 2 additions and 15 deletions
|
@ -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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue