[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:
parent
7fa50712c9
commit
2aef871d5d
@ -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