From 559fe0f769098df121e302dcd4009cfad6b701f1 Mon Sep 17 00:00:00 2001 From: JJ Allaire Date: Sat, 21 Mar 2020 08:09:55 -0400 Subject: [PATCH] remove isConnected check for images (not working) --- .../src/editor/src/nodes/image/image-view.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gwt/panmirror/src/editor/src/nodes/image/image-view.ts b/src/gwt/panmirror/src/editor/src/nodes/image/image-view.ts index 8fe0e81513c..3e79a22599b 100644 --- a/src/gwt/panmirror/src/editor/src/nodes/image/image-view.ts +++ b/src/gwt/panmirror/src/editor/src/nodes/image/image-view.ts @@ -151,17 +151,6 @@ export class ImageNodeView implements NodeView { if (this.imageAttributes) { initResizeContainer(this.dom); } - - // if the img is not yet connected to the DOM then poll until it is - // and update the image size - const updateSizeWhenConnected = () => { - if (this.img.isConnected) { - this.updateImageSize(); - } else { - setTimeout(updateSizeWhenConnected, 50); - } - }; - updateSizeWhenConnected(); } public selectNode() {