Browse Source

fix: resolve conflict - using class to control visiblity

Junyu Zhan 4 years ago
parent
commit
c250e2df0d
2 changed files with 3 additions and 4 deletions
  1. 2 3
      src/main/frontend/components/block.cljs
  2. 1 1
      src/main/frontend/ui.cljs

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

@@ -1156,9 +1156,8 @@
                        (if collapsed?
                          (editor-handler/expand-block! uuid)
                          (editor-handler/collapse-block! uuid)))))}
-      (when
-       control-show?
-        (ui/rotating-arrow collapsed?))]
+      [:span {:class (if control-show? "control-show" "control-hide")}
+       (ui/rotating-arrow collapsed?)]]
      [:a {:on-click (fn [e]
                       (bullet-on-click e block config uuid))}
       [:span.bullet-container.cursor

+ 1 - 1
src/main/frontend/ui.cljs

@@ -553,7 +553,7 @@
           :on-click (fn [e]
                       (util/stop e)
                       (swap! collapsed? not))}
-         (when @control? (rotating-arrow @collapsed?))]
+         [:span {:class (if @control? "control-show" "control-hide")} (rotating-arrow @collapsed?)]]
         (if (fn? header)
           (header @collapsed?)
           header)]]]