Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to choose the measurement function #14

Open
multimeric opened this issue Jul 23, 2019 · 0 comments · May be fixed by #15
Open

Option to choose the measurement function #14

multimeric opened this issue Jul 23, 2019 · 0 comments · May be fixed by #15

Comments

@multimeric
Copy link

Do you think you could add another argument to useDimensions() that lets you specify the type of measurement function?

For example, React Measure lets you choose between client, offset, and scroll (https://github.com/souporserious/react-measure#props), which are all slightly different measurement functions. I think there are also use cases for providing a getBBox() measurer.

My particular use-case is that I want the measurements in local SVG units, since they will inform the location of other SVG elements, so I need getBBox() as the source of the measurements, rather than getBoundingClientRect().

@multimeric multimeric linked a pull request Jul 24, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant