Enhance/pdf (#2855)

* feat(pdf): add go to annations page to pdf viewer toolbar

* improve(pdf): try to fix highlight selection blink

* improve(pdf): remove annations layer

* fix(pdf): try to fix selection blink

* Squashed commit of the following:

commit 995fba8623
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Thu Sep 16 13:59:08 2021 +0800

    fix: disable plugins on the Web

commit d6a011fd35
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Thu Sep 16 12:31:01 2021 +0800

    enhance(perf): add :ref/linked-references-collapsed-threshold option

    Related to #2792

commit f59f59b9ae
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 21:47:05 2021 +0800

    enhance: don't overwrite logseq's file if changes from journal file

    is empty or the default template content.

    To prevent overwritten when using iCloud/OneDrive/GDrive.

commit f5cdfaa2f1
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 20:59:10 2021 +0800

    fix: add command-palette/toggle

commit ae25bb387f
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 20:57:57 2021 +0800

    fix: add both Cmd+! and Cmd+Shift+p to configurable shortcuts

commit b20d29f813
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 17:12:20 2021 +0800

    fix: don't count as failed writes if content from the disk

    is not matched to the content in logseq

commit ac89a36ab0
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 14:31:48 2021 +0800

    chore: bump mldoc

commit c7128dfc87
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 12:31:11 2021 +0800

    enhance: text update

commit d965394be2
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 11:28:39 2021 +0800

    feat: add namespace query support

commit 4f1402ea42
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 09:52:56 2021 +0800

    enhance: remove the plus icon for switching graphs

commit 3550e4bbf0
Author: Gustavo Santos <gustavofsantos@outlook.com>
Date:   Tue Sep 14 13:43:57 2021 -0300

    fix: set aria-checked to "true" if toggle is on

commit 640d447b3b
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 09:48:47 2021 +0800

    debug: disable cache node modules temporally

commit 6ab7f44f5f
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Wed Sep 15 00:01:14 2021 +0800

    enhance: marketplace polish

commit 07063f1592
Author: charlie <xyhp915@qq.com>
Date:   Tue Sep 14 18:27:06 2021 +0800

    fix(plugin): restart app not work

commit 7b909704ab
Author: charlie <xyhp915@qq.com>
Date:   Tue Sep 14 15:43:30 2021 +0800

    fix(ui): broken width for plugins page when toggling widen mode

commit d456ed7823
Author: charlie <xyhp915@qq.com>
Date:   Tue Sep 14 15:36:32 2021 +0800

    enhance(plugin): polish marketplace ui

* fix(pdf): try to fix horizontal scroller when viewer overflow

* fix(pdf): make text selectable for embed highlight range

* feat(pdf): pager of viewer on toolbar

* fix: conflicts

* improve(pdf): register shortcuts for pager

* improve(pdf): try to fix area image blurry for high dpi screen

* improve(pdf): support dashed style for area highlight

* fix(pdf): change shortcuts for win32
This commit is contained in:
Charlie
2021-09-22 12:14:39 +08:00
committed by GitHub
parent 9dce190204
commit e47ad9909d
9 changed files with 240 additions and 56 deletions

View File

@@ -158,4 +158,17 @@
:left (- (+ (.-left rect) (.-scrollLeft page-cnt)) (.-left cnt-offset))
:width (.-width rect)
:height (.-height rect)})]
(optimize-client-reacts rects)))))
(optimize-client-reacts rects)))))
;; TODO: which viewer instance?
(defn next-page
[]
(try
(js-invoke js/window.lsPdfViewer "nextPage")
(catch js/Error e nil)))
(defn prev-page
[]
(try
(js-invoke js/window.lsPdfViewer "previousPage")
(catch js/Error e nil)))