Skip to content

Commit

Permalink
Update useRect.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Aug 5, 2022
1 parent dffd0df commit d0f84be
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/hooks/useRect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,5 @@ export default function useRect(
}
}, [element, enabled, measure, rerender])

// const resolvedRect = React.useMemo(() => {
// if (!element || !(element as Element).tagName) {
// return rect
// }

// const styles = window.getComputedStyle(element as Element)

// return {
// x: rect.x,
// y: rect.y,
// width:
// rect.width -
// parseInt(styles.borderLeftWidth) -
// parseInt(styles.borderRightWidth),
// height:
// rect.height -
// parseInt(styles.borderTopWidth) -
// parseInt(styles.borderBottomWidth),
// top: rect.top,
// right: rect.right,
// bottom: rect.bottom,
// left: rect.left,
// }
// }, [element, rect])

return rectRef.current
}

0 comments on commit d0f84be

Please sign in to comment.