Skip to content

Commit

Permalink
🐛 fix(custom): 修复图片尺寸导入时错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu-Jun committed Jul 10, 2024
1 parent 31e333f commit e2cf07a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pnpm build:mac
```

## 最后同步更新
- 时间:2024-07-10 commit: 64e3fb689640e30d40fb15cf9a1a8eef7e3a7c90 fix(历史记录): 适配回退为空
- 时间:2024-07-10 commit: 4b90a174653790013352e6be883e8150de311b4b 图片尺寸在画布自动缩放功能 (#467)


## 管理员
Expand Down
2 changes: 2 additions & 0 deletions src/lib/core/plugin/WorkspacePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class WorkspacePlugin implements IPluginTempl {
if (this.canvas.clearHistory) {
this.canvas.clearHistory()
}
this.auto()
}

// 返回workspace对象
Expand Down Expand Up @@ -142,6 +143,7 @@ class WorkspacePlugin implements IPluginTempl {
this.workspace.set('width', width)
this.workspace.set('height', height)
this.editor.emit('sizeChange', this.workspace.width, this.workspace.height)
this.auto()
}

setZoomAuto(scale: number, cb?: (left?: number, top?: number) => void) {
Expand Down

0 comments on commit e2cf07a

Please sign in to comment.