javierbyte / javierbyte/react-blur
Canvas to match Parent width / height
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 468
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
<div style={width: 900px}>
<Blur style={{width: "100%"}} img={url}></Blur>
</div>
<div style={width: 500px}>
<Blur style={{width: "100%"}} img={url}></Blur>
</div>
<div style={width: 300px}>
<Blur style={{width: "100%"}} img={url}></Blur>
</div>
<div style={width: 100px}>
<Blur style={{width: "100%"}} img={url}></Blur>
</div>
Error:
StackBlur.js:83 Uncaught Error: unable to access image data: IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source height is 0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the four parent-width examples in the issue and start at StackBlur.js:83, where the canvas image-data error occurs. Trace how the Blur component determines its canvas dimensions relative to each parent. Done means the examples no longer produce an IndexSizeError and the canvas matches the parent width and height.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100