mirror of
https://github.com/penpot/penpot.git
synced 2025-07-05 22:27:17 +02:00
🐛 Fix right click options over layer or shape
This commit is contained in:
parent
ecedf46c2a
commit
d2bfd98a05
1 changed files with 12 additions and 11 deletions
|
@ -1258,17 +1258,18 @@
|
||||||
not-group-like? (and (= (count selected) 1)
|
not-group-like? (and (= (count selected) 1)
|
||||||
(not (contains? #{:group :bool} (:type head))))
|
(not (contains? #{:group :bool} (:type head))))
|
||||||
no-bool-shapes? (->> all-selected (some (comp #{:frame :text} :type)))]
|
no-bool-shapes? (->> all-selected (some (comp #{:frame :text} :type)))]
|
||||||
|
|
||||||
(rx/concat
|
(if (and (some? shape) (not (contains? selected (:id shape))))
|
||||||
(when (and (some? shape) (not (contains? selected (:id shape))))
|
(rx/concat
|
||||||
(rx/of (dws/select-shape (:id shape))))
|
(rx/of (dws/select-shape (:id shape)))
|
||||||
(rx/of (show-context-menu
|
(rx/of (show-shape-context-menu params)))
|
||||||
(-> params
|
(rx/of (show-context-menu
|
||||||
(assoc
|
(-> params
|
||||||
:kind :shape
|
(assoc
|
||||||
:disable-booleans? (or no-bool-shapes? not-group-like?)
|
:kind :shape
|
||||||
:disable-flatten? no-bool-shapes?
|
:disable-booleans? (or no-bool-shapes? not-group-like?)
|
||||||
:selected (conj selected (:id shape)))))))))))
|
:disable-flatten? no-bool-shapes?
|
||||||
|
:selected (conj selected (:id shape)))))))))))
|
||||||
|
|
||||||
(defn show-page-item-context-menu
|
(defn show-page-item-context-menu
|
||||||
[{:keys [position page] :as params}]
|
[{:keys [position page] :as params}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue