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

[Bug]: Group with clipPath and children with shadow render error #10282

Open
7 tasks done
byeval opened this issue Nov 16, 2024 · 4 comments
Open
7 tasks done

[Bug]: Group with clipPath and children with shadow render error #10282

byeval opened this issue Nov 16, 2024 · 4 comments
Labels

Comments

@byeval
Copy link

byeval commented Nov 16, 2024

CheckList

  • I agree to follow this project's Code of Conduct
  • I have read and followed the Contributing Guide
  • I have read and followed the Issue Tracker Guide
  • I have searched and referenced existing issues and discussions
  • I am filing a BUG report.
  • I have managed to reproduce the bug after upgrading to the latest version
  • I have created an accurate and minimal reproduction

Version

6.0.2

In What environments are you experiencing the problem?

Chrome

Node Version (if applicable)

None

Link To Reproduction

https://codesandbox.io/p/sandbox/group-clippath-with-children-has-shadow-xplly3?file=%2Fsrc%2Findex.js%3A39%2C1&workspaceId=bc31a0d2-b26d-4ab3-b184-2d719079ef42

Steps To Reproduce

  1. create a rect with shadow as group background
  2. group add a clipPath
  3. render and get error

Expected Behavior

render correctly without error

Actual Behavior

render error and crashed
image

Error Message & Stack Trace

TypeError
Cannot read properties of undefined (reading 'forEach')
Mr.createClipPathLayer
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:70862
Mr._drawClipPath
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:71135
Mr.drawObject
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:117783
Mr.render
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:69247
Mr.render
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:118096
Cn._renderObjects
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:32024
Cn.renderCanvas
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:31275
Cn.renderAll
https://xplly3.csb.app/node_modules/fabric/dist/index.min.js:1:133748
@asturur asturur added the bug label Nov 17, 2024
@asturur
Copy link
Member

asturur commented Nov 17, 2024

Thanks for the bug report.
Must have to be something related the recent clipPath changes.

@asturur
Copy link
Member

asturur commented Nov 18, 2024

I checked this yesterday and i couldn't plan a quick fix.
I have to verify how rendering works when a group has a clipPath but is not caching, because i don't remember how does it do.

@byeval
Copy link
Author

byeval commented Nov 19, 2024

Hi @asturur, thanks for your reply! I'm trying to read fabric source code to see if I can contribute too.

@byeval
Copy link
Author

byeval commented Nov 27, 2024

Sorry, I don't have enough time to address this issue, I have read parts of the code, i don't understand what willDrawShadow do, if I just comment it, it seems worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants