mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 15:46:28 +08:00
fix(image-editing): Fix selector for finding <img>
This commit is contained in:
parent
fc7016fbaa
commit
f558f05d69
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ export default class InlineImageUploadContainer extends Component {
|
|||
editorEl.appendChild(editorCanvas);
|
||||
|
||||
const editorCtx = editorCanvas.getContext("2d");
|
||||
editorCtx.drawImage(el.querySelector('img.upload'), 0, 0, editorCanvas.width, editorCanvas.height);
|
||||
editorCtx.drawImage(el.querySelector('.file-preview img'), 0, 0, editorCanvas.width, editorCanvas.height);
|
||||
editorCtx.strokeStyle = "#df4b26";
|
||||
editorCtx.lineJoin = "round";
|
||||
editorCtx.lineWidth = 3 * window.devicePixelRatio;
|
||||
|
@ -100,7 +100,7 @@ export default class InlineImageUploadContainer extends Component {
|
|||
NylasEnv.showErrorDialog(err.toString())
|
||||
return;
|
||||
}
|
||||
const img = el.querySelector('img.upload');
|
||||
const img = el.querySelector('.file-preview img');
|
||||
img.style.width = `${rect.width}px`;
|
||||
img.style.height = `${rect.height}px`;
|
||||
img.src = `${img.src}?${Date.now()}`;
|
||||
|
|
Loading…
Reference in a new issue