mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 10:56:32 +00:00
@@ -1422,7 +1422,7 @@
|
||||
(every? #(= % ["Horizontal_Rule"]) body)))
|
||||
|
||||
(rum/defcs block-control < rum/reactive
|
||||
[state config block uuid block-id body children collapsed? *control-show? edit?]
|
||||
[state config block uuid block-id body children collapsed? *default-collapsed? *control-show? edit?]
|
||||
(let [doc-mode? (state/sub :document/mode?)
|
||||
has-children-blocks? (and (coll? children) (seq children))
|
||||
has-child? (and
|
||||
@@ -1446,6 +1446,7 @@
|
||||
:on-click (fn [event]
|
||||
(util/stop event)
|
||||
(when-not (and (not collapsed?) (not has-child?))
|
||||
(when ref? (swap! *default-collapsed? not))
|
||||
(if collapsed?
|
||||
(editor-handler/expand-block! uuid)
|
||||
(editor-handler/collapse-block! uuid))))}
|
||||
@@ -2264,7 +2265,7 @@
|
||||
:on-mouse-leave (fn [e]
|
||||
(block-mouse-leave e *control-show? block-id doc-mode?))}
|
||||
(when (not slide?)
|
||||
(block-control config block uuid block-id body children collapsed? *control-show? edit?))
|
||||
(block-control config block uuid block-id body children collapsed? *default-collapsed? *control-show? edit?))
|
||||
|
||||
(block-content-or-editor config block edit-input-id block-id heading-level edit?)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user