mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
improve(pdf): support draggable pdf viewer
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
(ns frontend.extensions.pdf.utils
|
||||
(:require [promesa.core :as p]
|
||||
[cljs-bean.core :as bean]
|
||||
[frontend.util :as front-utils]
|
||||
["/frontend/extensions/pdf/utils" :as js-utils]
|
||||
[frontend.loader :refer [load]]))
|
||||
|
||||
@@ -58,6 +59,10 @@
|
||||
[]
|
||||
(.removeAllRanges (js/window.getSelection)))
|
||||
|
||||
(def adjust-viewer-size!
|
||||
(front-utils/debounce
|
||||
200 (fn [^js viewer] (set! (. viewer -currentScaleValue) "auto"))))
|
||||
|
||||
(defn gen-id []
|
||||
(str (.toString (js/Date.now) 36)
|
||||
(.. (js/Math.random) (toString 36) (substr 2 4))))
|
||||
|
||||
Reference in New Issue
Block a user