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:
parent
107a836fd4
commit
6fe02feb3b
1 changed files with 9 additions and 0 deletions
|
@ -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 = '';
|
||||
|
||||
|
|
Loading…
Reference in a new issue