mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
fix(pdf): area highlights don't blink
Area highlights don't blink when jumping to it. Maybe we could unify the id naming style of all highlights elements. So, area highlights will blink as text highlights do. - `id` of text highlight:27e3b9d019/src/main/frontend/extensions/pdf/core.cljs (L254)- [The part for blinking](27e3b9d019/src/main/frontend/extensions/pdf/utils.js (L123C5-L130)) in `pdf/utils.js` ``` js // blink highlight function blinkHighlight () { const id = highlight?.id const el = document.getElementById(`hl_${id}`) if (!el) return el.classList.add('hl-flash') setTimeout(() => el?.classList.remove('hl-flash'), 1200) } ``` PS: I don't know if disabling the blinking is by design. Let me know if it's not a bug but a feature :)
This commit is contained in:
@@ -371,7 +371,7 @@
|
||||
(when-let [vw-bounding (get-in vw-hl [:position :bounding])]
|
||||
(let [{:keys [color]} (:properties hl)]
|
||||
[:div.extensions__pdf-hls-area-region
|
||||
{:id id
|
||||
{:id (str "hl_" id)
|
||||
:ref *el
|
||||
:style vw-bounding
|
||||
:data-color color
|
||||
|
||||
Reference in New Issue
Block a user