react-native-percentage-circle icon indicating copy to clipboard operation
react-native-percentage-circle copied to clipboard

Less than 50 bug still exsit in the current version.

Open Symous opened this issue 8 years ago • 9 comments

I use the newest version of the index.js and still encounter the less than 50 bug with Android. and I found that this PR has solved it already #10.

Symous avatar Jun 02 '17 11:06 Symous

Let me see. Maybe I should check the platform. This PR results in another bug in ios devices. Let me try it.

JackPu avatar Jun 05 '17 06:06 JackPu

could you paste some pictures? @Symous

JackPu avatar Jun 05 '17 06:06 JackPu

@JackPu in the current version of index.js , if we put 25% to the component , it will show 75% . but if we put 75% to the component it will show 75% as expected. I have modified the code to identify the different platform,now it worked well with Android .But still not tested with iOS.Maybe I will test it with iOS in a few days and do a PR.

Symous avatar Jun 05 '17 06:06 Symous

Hi @JackPu, I have same problem as you can see on image below

image

This screenshot is taken from ios simulator...

nikolasp avatar Jul 06 '17 20:07 nikolasp

I've found issue, just changed this

backgroundColor: this.props.percent < 50 ? this.props.bgcolor : this.props.color,

to

backgroundColor: this.props.color,

and everything is fine. Can someone else check this also?

nikolasp avatar Jul 06 '17 21:07 nikolasp

这个问题解决了没,我在ios设备上还是会出现 "react": "16.0.0-alpha.6", "react-native": "0.44.0", "react-native-percentage-circle": "^1.0.6",

genglei01 avatar Jul 28 '17 02:07 genglei01

This issue is still present on "react-native-percentage-circle": "^1.0.6",

ricbermo avatar Aug 04 '17 13:08 ricbermo

i have solved the issue,you need change these codes:

#line 11 import Platform

#line 96 // rightTransformerDegree = '0deg'; // leftTransformerDegree = -(50-percent) * 3.6 + 'deg';

if (Platform.OS == 'ios') { leftTransformerDegree = '0deg'; rightTransformerDegree = percent * 3.6 + 'deg'; }else{ leftTransformerDegree = '0deg'; rightTransformerDegree = -(50-percent) * 3.6 + 'deg'; }

#line 157 //backgroundColor: this.props.percent < 50 ? this.props.bgcolor : this.props.color,

backgroundColor: Platform.OS == 'ios' ? this.props.color : this.props.percent < 50 ? this.props.bgcolor : this.props.color,

line number maybe is wrong,just search the code :)

2017-09-06 09_18_19

xuk3r avatar Aug 18 '17 06:08 xuk3r

@a4101823 it seems not work when a percent likes 30.64

zhuozp avatar Aug 22 '17 08:08 zhuozp