mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix boolean operatos shown when there is no selection
This commit is contained in:
@@ -38,30 +38,18 @@
|
|||||||
(features/use-feature "render-wasm/v1")
|
(features/use-feature "render-wasm/v1")
|
||||||
|
|
||||||
has-invalid-shapes?
|
has-invalid-shapes?
|
||||||
(if render-wasm-enabled?
|
(some (if render-wasm-enabled?
|
||||||
false
|
cfh/frame-shape?
|
||||||
(some (fn [shape]
|
#(or (cfh/frame-shape? %) (cfh/text-shape? %)))
|
||||||
(or (cfh/frame-shape? shape)
|
shapes-with-children)
|
||||||
(cfh/text-shape? shape)))
|
|
||||||
shapes-with-children))
|
|
||||||
|
|
||||||
head-not-group-like?
|
head-not-group-like?
|
||||||
(and (= 1 total-selected)
|
(and (= 1 total-selected)
|
||||||
(not is-group?)
|
(not is-group?)
|
||||||
(not is-bool?))
|
(not is-bool?))
|
||||||
|
|
||||||
disabled-bool-btns
|
disabled-bool-btns (or (zero? total-selected) has-invalid-shapes? head-not-group-like?)
|
||||||
(if render-wasm-enabled?
|
disabled-flatten (or (zero? total-selected) has-invalid-shapes?)
|
||||||
false
|
|
||||||
(or (zero? total-selected)
|
|
||||||
has-invalid-shapes?
|
|
||||||
head-not-group-like?))
|
|
||||||
|
|
||||||
disabled-flatten
|
|
||||||
(if render-wasm-enabled?
|
|
||||||
false
|
|
||||||
(or (zero? total-selected)
|
|
||||||
has-invalid-shapes?))
|
|
||||||
|
|
||||||
on-change
|
on-change
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
|||||||
Reference in New Issue
Block a user