allow to upload initial

This commit is contained in:
Pete Matsyburka
2024-08-19 21:35:26 +03:00
parent 5f3a8bf391
commit 9472a6b5b0
2 changed files with 40 additions and 6 deletions
@@ -569,6 +569,11 @@ export default {
this.remove()
this.isSignatureStarted = true
this.drawOnCanvas(this.$refs.canvas)
this.uploadImageInputKey = Math.random().toString()
},
drawOnCanvas (canvas) {
const file = event.target.files[0]
if (file && file.type.match('image.*')) {
@@ -580,7 +585,6 @@ export default {
img.src = event.target.result
img.onload = () => {
const canvas = this.$refs.canvas
const context = canvas.getContext('2d')
const aspectRatio = img.width / img.height
@@ -615,8 +619,6 @@ export default {
}
reader.readAsDataURL(file)
this.uploadImageInputKey = Math.random().toString()
}
},
maybeSetSignedUuid (signedUuid) {