Skip to content

Commit

Permalink
fix: 修复 view.changeData 在重新渲染的时候 报 toFront 为 underfind 的错误 (#3438)
Browse files Browse the repository at this point in the history
* fix: 修复 view.changeData 在重新渲染的时候 报 toFront 为 underfind 的错误

* fix:修改 判断 toBack/toFront underfind 的判断方法

Co-authored-by: wb-xcf804241 <[email protected]>
  • Loading branch information
ai-qing-hai and ai-qing-hai authored May 31, 2021
1 parent ed3047e commit 76e08d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geometry/element/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default class Element extends Base {
}
states.push(stateName);
if (stateName === 'active' || stateName === 'selected') {
shape.toFront();
shape?.toFront();
}
} else {
if (index === -1) {
Expand All @@ -224,7 +224,7 @@ export default class Element extends Base {
}
states.splice(index, 1);
if (stateName === 'active' || stateName === 'selected') {
shape.toBack();
shape?.toBack();
}
}

Expand Down

0 comments on commit 76e08d0

Please sign in to comment.