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:
commit
e1de28c866
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user