🐛 Fix boolean operatos shown when there is no selection

This commit is contained in:
Alejandro Alonso
2025-11-27 11:22:15 +01:00
parent b23e0c0642
commit 1c70f5a36b

View File

@@ -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