Merge pull request #20328 from calixteman/fix_dialog_position

[Editor] Make sure the comment dialog always have relative coordinates between 0% and 100%
This commit is contained in:
calixteman 2025-10-03 09:17:09 +02:00 committed by GitHub
commit e1de28c866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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