diegomura / diegomura/react-pdf

clippath is misinterpreted

Open
#1,974 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Describe the bug**
According to MDN, the element written to ClipPath is later written to the element where the clipPath attribute is set.
Here the example from [https://developer.mozilla.org/en-US/docs/Web/SVG/Element/clipPath](url)

In react-pdf it's the other way around. As in the example from the documentation [https://react-pdf.org/repl?example=clippath](url)
Here the circle is drawn inside the rectangle.

**To Reproduce**
use the code from the documentation

**Expected behavior**
Works the way, like it is described in MDN

**Desktop (please complete the following information):**
- OS: [MacOS, Windows]
- Browser [all]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.