mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Set color/opacity when creating an overlaping highlight
This commit is contained in:
parent
4b84215970
commit
08b5bab68a
1 changed files with 2 additions and 3 deletions
|
|
@ -154,8 +154,6 @@ export default function PdfArticleContainer(
|
|||
}),
|
||||
})
|
||||
|
||||
console.log('toolbars: ', instance.toolbarItems, instance.currentAnnotationPreset, instance.annotationPresets)
|
||||
|
||||
instance.addEventListener('annotations.willChange', (event) => {
|
||||
const annotation = event.annotations.get(0)
|
||||
if (event.reason !== PSPDFKit.AnnotationsWillChangeReason.DELETE_END) {
|
||||
|
|
@ -285,7 +283,8 @@ export default function PdfArticleContainer(
|
|||
const annotation = new PSPDFKit.Annotations.HighlightAnnotation({
|
||||
pageIndex: highlightAnnotation.pageIndex,
|
||||
rects: rects,
|
||||
opacity: 0.4,
|
||||
opacity: 0.45,
|
||||
color: new PSPDFKit.Color({ r: 255, g: 210, b: 52 }),
|
||||
boundingBox: PSPDFKit.Geometry.Rect.union(rects),
|
||||
customData: {
|
||||
omnivoreHighlight: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue