mirror of https://github.com/logseq/logseq
fix(pdf): ctx menu bar position when zoom in
parent
f3cee33099
commit
a611d094bf
|
@ -104,9 +104,10 @@
|
||||||
;;])
|
;;])
|
||||||
|
|
||||||
(let [*el (rum/use-ref nil)
|
(let [*el (rum/use-ref nil)
|
||||||
head-height 0 ;; 48 temp
|
^js cnt (.-container viewer)
|
||||||
top (- (+ (:y point) (.. viewer -container -scrollTop)) head-height)
|
head-height 0 ;; 48 temp
|
||||||
left (:x point)
|
top (- (+ (:y point) (.-scrollTop cnt)) head-height)
|
||||||
|
left (+ (:x point) (.-scrollLeft cnt))
|
||||||
id (:id highlight)
|
id (:id highlight)
|
||||||
new? (nil? id)
|
new? (nil? id)
|
||||||
content (:content highlight)
|
content (:content highlight)
|
||||||
|
@ -852,6 +853,12 @@
|
||||||
:on-click #(set-area-mode! (not area-mode?))}
|
:on-click #(set-area-mode! (not area-mode?))}
|
||||||
(svg/icon-area 18)]
|
(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
|
;; zoom
|
||||||
[:a.button
|
[:a.button
|
||||||
{:title "Zoom out"
|
{:title "Zoom out"
|
||||||
|
@ -863,12 +870,6 @@
|
||||||
:on-click (partial pdf-utils/zoom-in-viewer viewer)}
|
:on-click (partial pdf-utils/zoom-in-viewer viewer)}
|
||||||
(svg/zoom-in 18)]
|
(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
|
[:a.button
|
||||||
{:title "Outline"
|
{:title "Outline"
|
||||||
:on-click #(set-outline-visible! (not outline-visible?))}
|
:on-click #(set-outline-visible! (not outline-visible?))}
|
||||||
|
|
Loading…
Reference in New Issue