8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fba4e77 commit d80150bCopy full SHA for d80150b
packages/core/useElementSize/index.ts
@@ -38,9 +38,9 @@ export function useElementSize(
38
if (window && isSVG.value) {
39
const $elem = unrefElement(target)
40
if ($elem) {
41
- const styles = window.getComputedStyle($elem)
42
- width.value = Number.parseFloat(styles.width)
43
- height.value = Number.parseFloat(styles.height)
+ const rect = $elem.getBoundingClientRect()
+ width.value = rect.width
+ height.value = rect.height
44
}
45
46
else {
0 commit comments