react-native-svg icon indicating copy to clipboard operation
react-native-svg copied to clipboard

Invalid RCTPointerEvents 'visiblePainted'

Open fadiquader opened this issue 6 years ago • 9 comments
trafficstars

Bug

I wanted to display an SVG image using SvgUri component, and it shows me this error:

Environment info

Env: ios 13.1.3 Node version: v12.3.1 Yarn version: 1.19.1 Xcode: Version 11.1 (11A1027)

"react-native": "0.61.2",
"react-native-svg": "^9.12.0"

React native info output:

  <SvgUri
      uri={uri}
      width="200"
      height="200"
    />

74582982_415161702533422_7771001147468283904_n

I've tried to set pointerEvents="none", but it didn't work. Any help? Thanks in advance

fadiquader avatar Oct 21 '19 14:10 fadiquader

Can you post a full reproduction?

msand avatar Oct 21 '19 14:10 msand

@msand Here is my code, I haven't done much! And I tested it on a physical device

import React from 'react';
import {View} from 'react-native'
import {SvgUri} from 'react-native-svg';

export const Slide = props => {
  const {image} = props;
  return (
    <View>
      <SvgUri
          uri={`https:${image.Location}`} // the uri ends with .svg
          width="200"
          height="200"
        />
    </View>
  )
}

fadiquader avatar Oct 21 '19 14:10 fadiquader

I mean the content of the svg file

msand avatar Oct 21 '19 15:10 msand

@msand Sorry for misunderstanding you here it is https://pdf2svg.s3.amazonaws.com/1.svg

fadiquader avatar Oct 21 '19 15:10 fadiquader

I'm getting the same error when I add pointerEvents="fill" to Path

<Svg
   height={deviceHeight - 200}
   width={deviceWidth}
>
    <Path
       ref={ref => this.pathRef = ref}
       fill="none"
       stroke='rgba(214,51,51,.2)'
       strokeWidth={35}
       onPress={() => console.log('path on pressed called!')}
       d="M 392.72727272727275 124.90909090909088 A 360 450 0 0 0 42.72727272727275 574.9090909090909"
       pointerEvents="fill"
    />
</Svg>

aniruddhashevle avatar Jan 20 '20 07:01 aniruddhashevle

There is wip for pointerevent in the develop branch, anyone mind taking a look at it to implement support for the svg specific values?

msand avatar Mar 08 '20 03:03 msand

related issue https://github.com/react-native-community/react-native-svg/issues/1290

msand avatar Mar 08 '20 03:03 msand

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] avatar May 07 '20 04:05 stale[bot]

https://github.com/software-mansion/react-native-svg/pull/944#issuecomment-464890123

kacperzolkiewski avatar Oct 01 '25 13:10 kacperzolkiewski