Przeglądaj źródła

fix: util/mobile? is a function

Tienson Qin 2 lat temu
rodzic
commit
48060cc758

+ 1 - 1
src/main/frontend/extensions/tldraw.cljs

@@ -100,7 +100,7 @@
    :getBlockPageName #(:block/name (model/get-block-page (state/get-current-repo) (parse-uuid %)))
    :exportToImage (fn [page-name options] (state/set-modal! #(export/export-blocks page-name (merge (js->clj options :keywordize-keys true) {:whiteboard? true}))))
    :isWhiteboardPage model/whiteboard-page?
-   :isMobile util/mobile?
+   :isMobile (util/mobile?)
    :saveAsset save-asset-handler
    :makeAssetUrl editor-handler/make-asset-url
    :copyToClipboard (fn [text, html] (util/copy-to-clipboard! text :html html))

+ 1 - 1
src/main/frontend/util.cljc

@@ -1269,7 +1269,7 @@
 #?(:cljs
    (defn scroll-editor-cursor
      [^js/HTMLElement el & {:keys [to-vw-one-quarter?]}]
-     (when (and el (or (mobile-util/native-platform?) mobile?))
+     (when (and el (or (mobile-util/native-platform?) (mobile?)))
        (let [box-rect    (.getBoundingClientRect el)
              box-top     (.-top box-rect)
              box-bottom  (.-bottom box-rect)