don't reinitialize url after every show

pull/1/head
Nicholas Bollweg 2020-05-18 20:50:16 -04:00
rodzic d048487945
commit df57fc6327
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -145,11 +145,15 @@ export class DrawioWidget extends DocumentWidget<IFrame> {
}
onAfterShow(msg: Message): void {
const url = this.drawioUrl();
if (this.content.url == url) {
return;
}
this._frame = this.content.node.querySelector(
"iframe"
) as HTMLIFrameElement;
window.addEventListener("message", (evt) => this.handleMessageEvent(evt));
this.content.url = this.drawioUrl();
this.content.url = url;
}
private _onContextReady(): void {