Merge pull request #20104 from calixteman/fix_newpopup
[Editor] Only add a popup to an existing annotation if it exits
This commit is contained in:
commit
e4585c2452
@ -215,7 +215,7 @@ class AnnotationElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let popup = this.#popupElement?.popup || this.popup;
|
let popup = this.#popupElement?.popup || this.popup;
|
||||||
if (!popup && newPopup.text) {
|
if (!popup && newPopup?.text) {
|
||||||
this._createPopup(newPopup);
|
this._createPopup(newPopup);
|
||||||
popup = this.#popupElement.popup;
|
popup = this.#popupElement.popup;
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ class AnnotationElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
popup.updateEdited(params);
|
popup.updateEdited(params);
|
||||||
if (newPopup.deleted) {
|
if (newPopup?.deleted) {
|
||||||
popup.remove();
|
popup.remove();
|
||||||
this.#popupElement = null;
|
this.#popupElement = null;
|
||||||
this.popup = null;
|
this.popup = null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user