FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

clip-path not recognized but clipPath is

Open pmahend1 opened this issue 5 years ago • 0 comments

🐛 Bug Report

Refer https://github.com/facebook/react/issues/6733 if you have xml attribute clip-path instead of clipPath it does not render the svg

Expected behavior

Should consider clip-path as valid attribute

Reproduction steps

see issue above

Configuration

Version: 2.4.11.xxx

Platform:

  • [x] :iphone: iOS
  • [x] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [x] :monkey: Xamarin.Forms

WorkAround

change clip-path to clipPath

Possible code change required

https://github.com/luberda-molinet/FFImageLoading/blob/bb675c6011b39ddccecbe6125d1853de81e6396a/source/FFImageLoading.Svg.Shared/SkSvg.cs#L1570

to


private SKPath ReadClipPathDefinition(XElement e)
{
    if (e.Name.LocalName != "clipPath" || e.Name.LocalName != 'clip-path' || !e.HasElements)
    { 
        return null;
    }

pmahend1 avatar Feb 24 '21 21:02 pmahend1