[Editor] Make sure the comment dialog always have relative coordinates between 0% and 100%

This way, when the window is resized, the dialog stay visible.
This commit is contained in:
Calixte Denizet 2025-10-02 18:55:48 +02:00
parent 7fa50712c9
commit 2aef871d5d

View File

@ -854,8 +854,9 @@ class CommentDialog {
posY = 0;
}
}
posX /= innerWidth;
posY /= innerHeight;
posX = MathClamp(posX / innerWidth, 0, 1);
posY = MathClamp(posY / innerHeight, 0, 1);
this.#setPosition(posX, posY);
await this.#overlayManager.open(this.#dialog);