(img, mimetype)
| 1227 | } |
| 1228 | |
| 1229 | fitImage(img, mimetype) { |
| 1230 | this.loadedImageType = mimetype; |
| 1231 | this.resize(img.naturalWidth, img.naturalHeight); |
| 1232 | this.ctx.drawImage(img, 0, 0); |
| 1233 | const minValue = Math.min(this.wrapper.documentClientHeight / this.size.h, this.wrapper.documentClientWidth / this.size.w); |
| 1234 | this.zoomFactor = minValue; |
| 1235 | this.adjustSizeFull(); |
| 1236 | this.worklog.captureState(); |
| 1237 | } |
| 1238 | |
| 1239 | loadImage(source, mimetype) { |
| 1240 | this.inserter.handleOpen(source, mimetype); |
no test coverage detected