소스 검색

enhance(ux): limit min width for the resized image

charlie 1 년 전
부모
커밋
3eded51689
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 1
      src/main/frontend/components/block.cljs
  2. 2 2
      src/main/frontend/components/block.css

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

@@ -408,7 +408,8 @@
                  (reset! *resizing-image? true))
                :move
                (let [width' (+ @*width dx)]
-                 (reset! *width width'))
+                 (when (> width' 120)
+                   (reset! *width width')))
                :end
                (let [width' @*width]
                  (when (and width' @*resizing-image?)

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

@@ -963,9 +963,9 @@ html.is-mac {
   @apply flex relative;
 
   .handle-left , .handle-right {
-    @apply absolute w-[6px] h-[15%] bg-black/30 hover:bg-black/70
+    @apply absolute w-[6px] h-[15%] min-h-[30px] bg-black/30 hover:bg-black/70
     top-[50%] left-[5px] rounded-full cursor-col-resize select-none
-    translate-y-[-50%] opacity-0;
+    translate-y-[-20%] opacity-0;
   }
 
   .handle-right {