2 Commits de0255516e ... 90eafdcff8

Author SHA1 Message Date
  wzl 90eafdcff8 update: 内容编辑首次渲染优化速度 1 month ago
  wzl de0255516e update: 内容编辑首次渲染优化速度 1 month ago
1 changed files with 5 additions and 2 deletions
  1. 5 2
      packages/core/src/editor/image_editor.js

+ 5 - 2
packages/core/src/editor/image_editor.js

@@ -80,8 +80,11 @@ export class ImageEditor {
     this.eventBus._on('imagePropertyChanged', this.onHandlePropertyPanelChanged)
     this.eventBus._on('showContentEditorType', this.onShowContentEditorType)
 
-    if (this.isUpdate) await this.updateCanvas()
-    else await this.getRect()
+    if (this.isUpdate) {
+      await this.updateCanvas()
+    } else {
+      await this.getRect()
+    }
 
     this.opacity = await this.messageHandler.sendWithPromise('GetImageTransparency', this.editAreaPtr)