Skip to content

Commit

Permalink
fix: can`t click to select node after restore json
Browse files Browse the repository at this point in the history
  • Loading branch information
xachary committed May 5, 2024
1 parent 27a4aa5 commit 1caab0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Render/tools/ImportExportTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ export class ImportExportTool {
// 往 main layer 插入新节点
this.render.layer.add(...nodes)

// Bug: 恢复 JSON 时候,如果存在已经被放大缩小点元素,点击选择无效
// 可能是 Konva 的 bug
this.render.selectionTool.select(this.render.layer.getChildren())
// 清空选择
this.render.selectionTool.selectingClear()

// 上一步、下一步 无需更新 history 记录
if (!silent) {
// 更新历史
Expand Down

0 comments on commit 1caab0c

Please sign in to comment.