Skip to content

Commit d0f84be

Browse files
committed
Update useRect.ts
1 parent dffd0df commit d0f84be

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/hooks/useRect.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,5 @@ export default function useRect(
6464
}
6565
}, [element, enabled, measure, rerender])
6666

67-
// const resolvedRect = React.useMemo(() => {
68-
// if (!element || !(element as Element).tagName) {
69-
// return rect
70-
// }
71-
72-
// const styles = window.getComputedStyle(element as Element)
73-
74-
// return {
75-
// x: rect.x,
76-
// y: rect.y,
77-
// width:
78-
// rect.width -
79-
// parseInt(styles.borderLeftWidth) -
80-
// parseInt(styles.borderRightWidth),
81-
// height:
82-
// rect.height -
83-
// parseInt(styles.borderTopWidth) -
84-
// parseInt(styles.borderBottomWidth),
85-
// top: rect.top,
86-
// right: rect.right,
87-
// bottom: rect.bottom,
88-
// left: rect.left,
89-
// }
90-
// }, [element, rect])
91-
9267
return rectRef.current
9368
}

0 commit comments

Comments
 (0)