Skip to content

Commit 2fc636d

Browse files
author
knight.chen
committed
fix(vue-simulator-renderer): 修复移动画布组件位置导致的渲染错误
1 parent 44bbabb commit 2fc636d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/vue-simulator-renderer/src/utils/get-client-rects.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { isElement } from '@knxcloud/lowcode-utils';
44
const cycleRange = document.createRange();
55

66
export function getClientRects(node: Element | Text) {
7+
if (!node.parentNode) return [];
8+
79
if (isElement(node)) {
810
return [node.getBoundingClientRect()];
911
}

0 commit comments

Comments
 (0)