Fix image cropping. Issue #1967
This commit is contained in:
parent
400b8b7625
commit
02f62bbb61
|
@ -37,7 +37,7 @@ class ImageViewer {
|
|||
var canvas = document.createElement("canvas");
|
||||
canvas.width = this.img.naturalWidth;
|
||||
canvas.height = this.img.naturalHeight;
|
||||
canvas.getContext("2d").drawImage(this.img, 0, 0);
|
||||
canvas.getContext("2d").drawImage(this.img, 0, 0, canvas.width, canvas.height);
|
||||
|
||||
const rect = this.img.getBoundingClientRect();
|
||||
const message = {
|
||||
|
|
Loading…
Reference in New Issue