mirror of https://github.com/logseq/logseq
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:pull/10765/head27e3b9d019/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 :)
parent
8040168d1e
commit
28de2b70ab
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue