Skip to content

Commit d9db17e

Browse files
committed
fix: fixed element is visible
1 parent b703ad1 commit d9db17e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Dom/isVisible.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,12 @@ export default (element: HTMLElement | SVGGraphicsElement): boolean => {
1414
}
1515
}
1616

17+
if ((element as HTMLElement).getBoundingClientRect) {
18+
const box = (element as HTMLElement).getBoundingClientRect();
19+
if (box.width || box.height) {
20+
return true;
21+
}
22+
}
23+
1724
return false;
1825
};

0 commit comments

Comments
 (0)