Get rid of image natural dimensions

This commit is contained in:
Martynas Bagdonas 2021-02-18 14:35:26 +02:00 committed by Dan Stillman
parent eb865e2625
commit a225c498ec

View file

@ -228,7 +228,7 @@ class EditorInstance {
const PDFJS_DEFAULT_SCALE = 1.25;
let width = Math.round(rectWidth * CSS_UNITS * PDFJS_DEFAULT_SCALE);
let height = Math.round(rectHeight * width / rectWidth);
imageHTML = `<img data-attachment-key="${imageAttachmentKey}" width="${width}" height="${height}" data-natural-width="${annotation.imageNaturalWidth}" data-natural-height="${annotation.imageNaturalHeight}" data-annotation="${encodeURIComponent(JSON.stringify(annotation))}"/>`;
imageHTML = `<img data-attachment-key="${imageAttachmentKey}" width="${width}" height="${height}" data-annotation="${encodeURIComponent(JSON.stringify(annotation))}"/>`;
}
// Text