fix(pdf): ctx menu bar position when zoom in

pull/4383/head
charlie 2022-02-24 00:07:42 +08:00 committed by Tienson Qin
parent f3cee33099
commit a611d094bf
1 changed files with 10 additions and 9 deletions

View File

@ -104,9 +104,10 @@
;;])
(let [*el (rum/use-ref nil)
head-height 0 ;; 48 temp
top (- (+ (:y point) (.. viewer -container -scrollTop)) head-height)
left (:x point)
^js cnt (.-container viewer)
head-height 0 ;; 48 temp
top (- (+ (:y point) (.-scrollTop cnt)) head-height)
left (+ (:x point) (.-scrollLeft cnt))
id (:id highlight)
new? (nil? id)
content (:content highlight)
@ -852,6 +853,12 @@
:on-click #(set-area-mode! (not area-mode?))}
(svg/icon-area 18)]
[:a.button
{:title "Highlight mode"
:class (when highlight-mode? "is-active")
:on-click #(set-highlight-mode! (not highlight-mode?))}
(svg/highlighter 16)]
;; zoom
[:a.button
{:title "Zoom out"
@ -863,12 +870,6 @@
:on-click (partial pdf-utils/zoom-in-viewer viewer)}
(svg/zoom-in 18)]
[:a.button
{:title "Highlight mode"
:class (when highlight-mode? "is-active")
:on-click #(set-highlight-mode! (not highlight-mode?))}
(svg/highlighter 16)]
[:a.button
{:title "Outline"
:on-click #(set-outline-visible! (not outline-visible?))}