diff --git a/frontend/javascript/components/redaction/pdf-redaction.vue b/frontend/javascript/components/redaction/pdf-redaction.vue index 0dc2d508a..78d00f830 100644 --- a/frontend/javascript/components/redaction/pdf-redaction.vue +++ b/frontend/javascript/components/redaction/pdf-redaction.vue @@ -244,7 +244,10 @@
{ - this.drawRectangle(ctx, r) + this.drawRectangle(ctx, r, true) }) } if (this.startDrag && this.endDrag) { - this.drawRectangle(ctx, this.getRect(this.startDrag, this.endDrag)) + this.drawRectangle( + ctx, + this.getRect(this.startDrag, this.endDrag), + false + ) } }, applyActionsOnPageLoad() { @@ -1425,7 +1457,12 @@ export default { textAfter: text.replace(match, replace) } ], - rects: [[x - padding, y, width + padding * 2, height]], + rects: [[ + (x - padding) / this.scaleFactor, + y / this.scaleFactor, + (width + padding * 2) / this.scaleFactor, + height / this.scaleFactor, + ]], page: this.currentPage } }, @@ -1521,8 +1558,8 @@ export default { overflow: hidden; } -.preview--do-paint[style], -.preview--do-paint .redactContainer[style] { +.preview--do-paint.preview--text-only[style], +.preview--do-paint.preview--text-only .redactContainer[style] { user-select: text !important; }