From 8d61fc1fde95e9566c1b0077ba9c8e8cb77fbe0c Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 8 Feb 2024 20:07:12 +0100 Subject: [PATCH] [Editor] Compute the position of the last point before applying rotation (bug 1879113) --- src/display/editor/highlight.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/display/editor/highlight.js b/src/display/editor/highlight.js index b421c19e0b369..c16632097ebef 100644 --- a/src/display/editor/highlight.js +++ b/src/display/editor/highlight.js @@ -169,11 +169,9 @@ class HighlightEditor extends AnnotationEditor { break; } } + const { lastPoint } = this.#focusOutlines.box; - this.#lastPoint = [ - (lastPoint[0] - this.x) / this.width, - (lastPoint[1] - this.y) / this.height, - ]; + this.#lastPoint = [(lastPoint[0] - x) / width, (lastPoint[1] - y) / height]; } /** @inheritdoc */