Browse Source

enhance(ui): only display block controls when hovering

Tienson Qin 3 years ago
parent
commit
23e46588b3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/frontend/components/block.cljs

+ 2 - 2
src/main/frontend/components/block.cljs

@@ -1560,8 +1560,8 @@
                      (if collapsed?
                      (if collapsed?
                        (editor-handler/expand-block! uuid)
                        (editor-handler/expand-block! uuid)
                        (editor-handler/collapse-block! uuid))))}
                        (editor-handler/collapse-block! uuid))))}
-      [:span {:class (if (or collapsed?
-                             (and control-show?
+      [:span {:class (if (and control-show?
+                              (or collapsed?
                                   (editor-handler/collapsable? uuid {:semantic? true}))) "control-show cursor-pointer" "control-hide")}
                                   (editor-handler/collapsable? uuid {:semantic? true}))) "control-show cursor-pointer" "control-hide")}
        (ui/rotating-arrow collapsed?)]]
        (ui/rotating-arrow collapsed?)]]
      (let [bullet [:a {:on-click (fn [event]
      (let [bullet [:a {:on-click (fn [event]