Avoid having overflowing sections (#15036 follow-up)
This commit is contained in:
parent
45de73bd00
commit
af47a0b7e0
@ -908,7 +908,7 @@ class WidgetAnnotationElement extends AnnotationElement {
|
|||||||
const height = Math.abs(this.data.rect[3] - this.data.rect[1]);
|
const height = Math.abs(this.data.rect[3] - this.data.rect[1]);
|
||||||
computedFontSize = Math.min(fontSize, Math.round(height / LINE_FACTOR));
|
computedFontSize = Math.min(fontSize, Math.round(height / LINE_FACTOR));
|
||||||
}
|
}
|
||||||
style.fontSize = `${computedFontSize}%`;
|
style.fontSize = `calc(${computedFontSize}px * var(--scale-factor))`;
|
||||||
|
|
||||||
style.color = Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);
|
style.color = Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
font-size: calc(100px * var(--scale-factor));
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transform-origin: 0 0;
|
transform-origin: 0 0;
|
||||||
}
|
}
|
||||||
@ -90,7 +89,7 @@
|
|||||||
background-image: var(--annotation-unfocused-field-background);
|
background-image: var(--annotation-unfocused-field-background);
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font: 9% sans-serif;
|
font: calc(9px * var(--scale-factor)) sans-serif;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user