diff --git a/package-lock.json b/package-lock.json index f157ea152b..33d5dcb99a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "agpl", "dependencies": { "@fontsource/dancing-script": "^5.1.0", - "@libresign/vue-pdf-editor": "^1.4.4", + "@libresign/vue-pdf-editor": "^1.4.5", "@marionebl/option": "^1.0.8", "@mdi/js": "^7.4.47", "@mdi/svg": "^7.4.47", @@ -2635,9 +2635,9 @@ "peer": true }, "node_modules/@libresign/vue-pdf-editor": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@libresign/vue-pdf-editor/-/vue-pdf-editor-1.4.4.tgz", - "integrity": "sha512-UpyqrLy11guAgJ3swndbjzJtLRqcqNt3SpTdet5b6JDPZtActkWwcZ5vbhYgic3oJXAGu4AKr+F0RQrBoEXcTA==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@libresign/vue-pdf-editor/-/vue-pdf-editor-1.4.5.tgz", + "integrity": "sha512-ntt3JWlXSXuaQzH7wzdLlgD13fKEReTaQbEMw0WkFyNFzCHfQs2PmMHrz4vLyX1qGFcu4k7gHcJmnbForJ6eog==", "license": "MIT", "dependencies": { "@cantoo/pdf-lib": "^2.2.3", diff --git a/package.json b/package.json index 5b261b9c13..4adc585bba 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@fontsource/dancing-script": "^5.1.0", - "@libresign/vue-pdf-editor": "^1.4.4", + "@libresign/vue-pdf-editor": "^1.4.5", "@marionebl/option": "^1.0.8", "@mdi/js": "^7.4.47", "@mdi/svg": "^7.4.47", diff --git a/src/Components/PdfEditor/PdfEditor.vue b/src/Components/PdfEditor/PdfEditor.vue index f8f6ce19aa..8d29ad8461 100644 --- a/src/Components/PdfEditor/PdfEditor.vue +++ b/src/Components/PdfEditor/PdfEditor.vue @@ -30,8 +30,6 @@ :origin-width="object.originWidth" :origin-height="object.originHeight" :page-scale="pagesScale" - :canvas-width="object.canvasWidth" - :canvas-height="object.canvasHeight" @onUpdate="$refs.vuePdfEditor.updateObject(object.id, $event)" @onDelete="onDeleteSigner(object)" /> @@ -80,8 +78,6 @@ export default { originHeight: signer.element.coordinates.height, x: signer.element.coordinates.llx, y: signer.element.coordinates.ury, - canvasWidth: signer.element.coordinates.canvasWidth, - canvasHeight: signer.element.coordinates.canvasHeight, } this.$refs.vuePdfEditor.allObjects = this.$refs.vuePdfEditor.allObjects.map((objects, pIndex) => { if (pIndex === signer.element.coordinates.page - 1) { diff --git a/src/Components/PdfEditor/Signature.vue b/src/Components/PdfEditor/Signature.vue index e59155c7de..157352b3c9 100644 --- a/src/Components/PdfEditor/Signature.vue +++ b/src/Components/PdfEditor/Signature.vue @@ -93,14 +93,6 @@ export default { type: Number, default: 1, }, - canvasWidth: { - type: Number, - default: 1, - }, - canvasHeight: { - type: Number, - default: 1, - }, fixSize: { type: Boolean, default: false, diff --git a/src/Components/Request/VisibleElements.vue b/src/Components/Request/VisibleElements.vue index 249c0638c5..272873696e 100644 --- a/src/Components/Request/VisibleElements.vue +++ b/src/Components/Request/VisibleElements.vue @@ -199,7 +199,7 @@ export default { updateSigners(data) { this.document.signers.forEach(signer => { if (this.document.visibleElements) { - this.document.visibleElements.forEach(element => { + Object.values(this.document.visibleElements).forEach(element => { if (element.signRequestId === signer.signRequestId) { const object = structuredClone(signer) element.coordinates.ury = Math.round(data.measurement[element.coordinates.page].height) @@ -226,7 +226,6 @@ export default { this.stopAddSigner() }, addSignerToPosition(event, page) { - const measurement = this.$refs.pdfEditor.$refs.vuePdfEditor.$refs['page' + page][0].getCanvasMeasurement() const rect = event.target.getBoundingClientRect() const x = event.clientX - rect.left const y = event.clientY - rect.top @@ -237,8 +236,6 @@ export default { ury: y - SignatureImageDimensions.height / 2, height: SignatureImageDimensions.height, width: SignatureImageDimensions.width, - canvasWidth: measurement.canvasWidth, - canvasHeight: measurement.canvasHeight, }, } this.$refs.pdfEditor.addSigner(this.signerSelected)