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

Let Overlay overflow canvas bounds by default #1470

Merged
merged 1 commit into from
Aug 21, 2023
Merged

Let Overlay overflow canvas bounds by default #1470

merged 1 commit into from
Aug 21, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Aug 11, 2023

Following #1467, we now have a wrapper around the canvas (with the exact same size as the canvas) called canvasWrapper that, unlike r3fRoot, does not hide overflow. This provides an opportunity for the Overlay component, as consumers may want an overlay that allow its children to overflow past the canvas' bounds.

This PR now renders Overlay with <Html overflowCanvas>, making the overflowing behaviour the default. Consumers may hide the overflow by simply passing style={{ overflow: 'hidden' }}.

Note that this change affects TooltipOverlay and therefore TooltipMesh. However, since we use TooltipWithBounds internally, the tooltip never actually leaves the bounds of the canvas, so there is no visible change. In fact, this might open up new opportunities, as I believe @vallsv was after a tooltip and/or tooltip guides (i.e. cross hairs) that overflow past the canvas bounds.

@axelboc axelboc requested a review from loichuder August 11, 2023 08:44
Base automatically changed from fix-annoations to main August 21, 2023 13:33
@axelboc axelboc merged commit e44a1d8 into main Aug 21, 2023
@axelboc axelboc deleted the overlays branch August 21, 2023 13:37
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 this pull request may close these issues.

2 participants