浏览代码

chore: remove unused code

Weihua Lu 4 年之前
父节点
当前提交
5939ac3502
共有 1 个文件被更改,包括 0 次插入34 次删除
  1. 0 34
      src/main/frontend/util.cljc

+ 0 - 34
src/main/frontend/util.cljc

@@ -506,40 +506,6 @@
   [repo-url]
   [repo-url]
   (take-last 2 (string/split repo-url #"/")))
   (take-last 2 (string/split repo-url #"/")))
 
 
-#?(:cljs
-   (defn get-textarea-height
-     [input]
-     (some-> input
-             (d/style)
-             (gobj/get "height")
-             (string/split #"\.")
-             first
-             (parse-int))))
-
-#?(:cljs
-   (defn get-textarea-line-height
-     [input]
-     (try
-       (some-> input
-               (d/style)
-               (gobj/get "lineHeight")
-                ;; TODO: is this cross-platform?
-               (string/replace "px" "")
-               (parse-int))
-       (catch js/Error _e
-         24))))
-
-#?(:cljs
-   (defn textarea-cursor-first-row?
-     [input line-height]
-     (<= (:top (get-caret-pos input)) line-height)))
-
-#?(:cljs
-   (defn textarea-cursor-end-row?
-     [input line-height]
-     (>= (+ (:top (get-caret-pos input)) line-height)
-         (get-textarea-height input))))
-
 (defn safe-split-first [pattern s]
 (defn safe-split-first [pattern s]
   (if-let [first-index (string/index-of s pattern)]
   (if-let [first-index (string/index-of s pattern)]
     [(subs s 0 first-index)
     [(subs s 0 first-index)