Merge pull request #15011 from Snuffleupagus/misc-review-comments

Fix a couple of old review comments
This commit is contained in:
calixteman 2022-06-09 13:52:51 +02:00 committed by GitHub
commit a1bc5a8fe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -2706,7 +2706,7 @@ class ChoiceWidgetAnnotation extends WidgetAnnotation {
let lineWidth = -1;
let value;
for (const { displayValue } of this.data.options) {
const width = this._getTextWidth(displayValue);
const width = this._getTextWidth(displayValue, font);
if (width > lineWidth) {
lineWidth = width;
value = displayValue;

View File

@ -70,7 +70,8 @@ class ColorConverters {
}
static CMYK_HTML(components) {
return this.RGB_HTML(this.CMYK_RGB(components));
const rgb = this.CMYK_RGB(components).slice(1);
return this.RGB_HTML(rgb);
}
static RGB_CMYK([r, g, b]) {

View File

@ -117,7 +117,7 @@ const FontInspector = (function FontInspectorClosure() {
download.href = url[1];
} else if (fontObj.data) {
download.href = URL.createObjectURL(
new Blob([fontObj.data], { type: fontObj.mimeType })
new Blob([fontObj.data], { type: fontObj.mimetype })
);
}
download.textContent = "Download";