mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #17586 from calixteman/editor_freehighlight_outline_inside
[Editor] Remove the outline which is inside the free highlight shape
This commit is contained in:
commit
245fd02141
2 changed files with 68 additions and 14 deletions
|
@ -56,22 +56,52 @@
|
|||
fill-rule: evenodd;
|
||||
fill: none;
|
||||
|
||||
&.hovered {
|
||||
stroke: var(--hover-outline-color);
|
||||
stroke-width: var(--outline-width);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
.mainOutline {
|
||||
stroke: var(--outline-around-color);
|
||||
stroke-width: calc(
|
||||
var(--outline-width) + 2 * var(--outline-around-width)
|
||||
);
|
||||
&:not(.free) {
|
||||
&.hovered:not(.selected) {
|
||||
stroke: var(--hover-outline-color);
|
||||
stroke-width: var(--outline-width);
|
||||
}
|
||||
|
||||
.secondaryOutline {
|
||||
stroke: var(--outline-color);
|
||||
stroke-width: var(--outline-width);
|
||||
&.selected {
|
||||
.mainOutline {
|
||||
stroke: var(--outline-around-color);
|
||||
stroke-width: calc(
|
||||
var(--outline-width) + 2 * var(--outline-around-width)
|
||||
);
|
||||
}
|
||||
|
||||
.secondaryOutline {
|
||||
stroke: var(--outline-color);
|
||||
stroke-width: var(--outline-width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.free {
|
||||
/*
|
||||
When drawing the outline we use a mask in order to remove the parts
|
||||
that are inside the shape. Unfortunately, this removes the part of the
|
||||
outline that is inside the shape. To "fix" this we increase the width
|
||||
to have what we want to be visible outside the shape.
|
||||
This is not a perfect solution, but it works well enough.
|
||||
*/
|
||||
&.hovered:not(.selected) {
|
||||
stroke: var(--hover-outline-color);
|
||||
stroke-width: calc(2 * var(--outline-width));
|
||||
}
|
||||
|
||||
&.selected {
|
||||
.mainOutline {
|
||||
stroke: var(--outline-around-color);
|
||||
stroke-width: calc(
|
||||
2 * (var(--outline-width) + var(--outline-around-width))
|
||||
);
|
||||
}
|
||||
|
||||
.secondaryOutline {
|
||||
stroke: var(--outline-color);
|
||||
stroke-width: calc(2 * var(--outline-width));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue