Skip to content

Commit

Permalink
fix: selectNode updateRect conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
chilingling committed Nov 11, 2024
1 parent dd14e75 commit 82c922f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/canvas/DesignCanvas/src/api/useCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,11 @@ const operateNode = async (operation) => {

publish({ topic: 'schemaChange', data: { operation } })

setTimeout(() => {
canvasApi.value.updateRect?.()
}, 0)
if (operation.type !== 'insert') {
setTimeout(() => {
canvasApi.value.updateRect?.()
}, 0)
}
}

// 获取传入的 schema 与最新 schema 的 diff
Expand Down

0 comments on commit 82c922f

Please sign in to comment.