Adjust other view cell cursor pop up position when needed.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I64e1a2a2c31c06579e312da4d97e185a5e4c84b6
This commit is contained in:
Gökay Şatır 2024-07-19 12:43:08 +03:00 committed by Szymon Kłos
parent 107a836fd4
commit 6fe02feb3b

View file

@ -65,6 +65,13 @@ class OtherViewCellCursorSection extends CanvasSectionObject {
this.sectionProperties.popUpContainer.style.top = pos[1] + 'px';
}
onNewDocumentTopLeft(size: Array<number>): void {
if (this.showSection)
this.adjustPopUpPosition();
else
this.hideUsernamePopUp();
}
prepareUsernamePopUp() {
if (this.sectionProperties.popUpContainer === null) {
const popUpContainer = document.createElement('div');
@ -102,6 +109,8 @@ class OtherViewCellCursorSection extends CanvasSectionObject {
showUsernamePopUp() {
if (this.sectionProperties.popUpContainer) {
this.adjustPopUpPosition();
this.sectionProperties.popUpShown = true;
this.sectionProperties.popUpContainer.style.display = '';