1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

[Annotation] Use the clip-path property when an annotation has some quad points

This way it'll avoid to split a div in multiple divs having the same id (which
is supposed to be unique).
This commit is contained in:
Calixte Denizet 2023-05-30 12:36:35 +02:00
parent dca4bc0f24
commit 8daf2f1eb1
4 changed files with 128 additions and 81 deletions

View file

@ -120,13 +120,21 @@
}
.annotationLayer
:is(.linkAnnotation, .buttonWidgetAnnotation.pushButton)
:is(.linkAnnotation, .buttonWidgetAnnotation.pushButton):not(.hasBorder)
> a:hover {
opacity: 0.2;
background: rgba(255, 255, 0, 1);
background-color: rgba(255, 255, 0, 1);
box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
}
.annotationLayer .linkAnnotation.hasBorder:hover {
background-color: rgba(255, 255, 0, 0.2);
}
.annotationLayer .hasBorder {
background-size: 100% 100%;
}
.annotationLayer .textAnnotation img {
position: absolute;
cursor: pointer;
@ -368,3 +376,13 @@
width: 100%;
display: inline-block;
}
.annotationLayer svg.quadrilateralsContainer {
contain: strict;
width: 0;
height: 0;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}