allow to upload initial

This commit is contained in:
Pete Matsyburka committed 2024-08-25 16:03:23 +03:00
1 parent 5f3a8bf391
commit 9472a6b5b0
2 files changed
+40 -6

No files matched your search

@@ -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) {