mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
enhance(pdf): remove invalid highlight selection range rects
This commit is contained in:
@@ -145,7 +145,8 @@
|
||||
^js cnt-offset (.getBoundingClientRect page-cnt)]
|
||||
|
||||
(when (seq rge-rects)
|
||||
(let [rects (for [rect rge-rects]
|
||||
(let [rects (for [rect rge-rects
|
||||
:when (and rect (not (zero? (.-width rect))) (not (zero? (.-height rect))))]
|
||||
{:top (- (+ (.-top rect) (.-scrollTop page-cnt)) (.-top cnt-offset))
|
||||
:left (- (+ (.-left rect) (.-scrollLeft page-cnt)) (.-left cnt-offset))
|
||||
:width (.-width rect)
|
||||
|
||||
Reference in New Issue
Block a user