konvajs / konva

Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://konvajs.org/
Other
11.43k stars 918 forks source link

Can't cornerRadius and shadow be shared on the react-Konva Image component? #1734

Closed whwanyt closed 2 months ago

whwanyt commented 6 months ago

I found that cornerRadius and shadow cannot be shared in react18. Is it a bug, or is it a problem with my code? https://codesandbox.io/p/sandbox/great-shirley-jc84pl?file=%2Fsrc%2FApp.tsx%3A24%2C19

lavrton commented 6 months ago

That is a bug and I am not sure yet what will be the good fix from Konva side. The workaround is to apply fill with some solid color like black. Will work ok for non-transparent images.

lavrton commented 2 months ago

Should work good with the last version.