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

Document transforming selections and rendering SVG elements #1349

Merged
merged 2 commits into from
Jan 17, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Jan 16, 2023

Peek 2023-01-16 15-12

Peek 2023-01-16 15-37

fill-opacity: 0.2;
stroke: teal;
stroke-width: 2;
pointer-events: auto;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this blocks panning/zooming when hovering the rectangle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we'll have to find a solution for this at some point...

]}
>
{(pt1, pt2, pt3, pt4, pt5, pt6) => (
<SvgElement>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: it is possible to wrap several DataToHtml (e.g. one per shape) in a single SvgElement ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, DataToHtml cannot be inside SvgElement since it requires access to the R3F context. SvgElement changes the renderer so we lose access to that context. You can have multiple SvgElement and wrap each of them with a DataToHtml, though. It's the same problem as with Html.

@axelboc axelboc merged commit 32bae0c into main Jan 17, 2023
@axelboc axelboc deleted the transform-story branch January 17, 2023 07:56
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