Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

How to put Image vertical with Text value in wheel #22

Open
Cskian opened this issue May 6, 2021 · 5 comments
Open

How to put Image vertical with Text value in wheel #22

Cskian opened this issue May 6, 2021 · 5 comments

Comments

@Cskian
Copy link

Cskian commented May 6, 2021

image

I pass below array in rewards property

const participants = [
'%10',
'%20',
'%30',
'%40',
'%50',
'%60',
'%70',
'%90',
'FREE',
];

And How to remove center red Small Circle?

@Cskian
Copy link
Author

Cskian commented May 6, 2021

In Wheel Circle we can put value in array and passed in rewards property.
but I need to set Image vertical also with string value.
How can I set image with text?

image

red Circle type view I need how can I do that

@eftalyurtseven Eftal Yurtseven please help to short out that issue

Thanks In advance

@bouchja1
Copy link

bouchja1 commented Sep 8, 2021

Hi @Cskian, I need to pass the image with rewards too. Please, do you have any code snippet how are you passing this to the wheel? Thanks.

@kukuandroid
Copy link

@bouchja1 hi, did you manage to find a solution ? Thanks

@suusofttruongnv
Copy link

suusofttruongnv commented Oct 13, 2021

@bouchja1 hi, did you manage to find a solution ? Thanks

You go to link https://github.com/suusofttruongnv/react-native-wheel-of-fortune.git
next move into src/.. directory on git and update index.js file, create new imageReward.js file in your source code

like the image below:

image

How to use:

const iconRewards = [
    require('./assets/images/knoob.png'),
    require('./assets/images/knoob.png'),
    .....
]

const wheelOptions = {
      rewards: participants,
      knobSize: 50,
      borderWidth: 5,
      borderColor: '#000',
      innerRadius: 50,
      duration: 4000,
      backgroundColor: 'transparent',
      textAngle: 'horizontal',
      knobSource: require('./assets/images/knoob.png'),
      typeRewards: typeRewards,
      sizeIconReward: 40,
      iconRewards: iconRewards,
      getWinner: (value, index) => {
        this.setState({winnerValue: value, winnerIndex: index});
      },
      onRef: ref => (this.child = ref),
    };

@ItxAltaf
Copy link

ItxAltaf commented Jan 5, 2022

@bouchja1 hi, did you manage to find a solution ? Thanks

You go to link https://github.com/suusofttruongnv/react-native-wheel-of-fortune.git next move into src/.. directory on git and update index.js file, create new imageReward.js file in your source code

like the image below:

image

How to use:

const iconRewards = [
    require('./assets/images/knoob.png'),
    require('./assets/images/knoob.png'),
    .....
]

const wheelOptions = {
      rewards: participants,
      knobSize: 50,
      borderWidth: 5,
      borderColor: '#000',
      innerRadius: 50,
      duration: 4000,
      backgroundColor: 'transparent',
      textAngle: 'horizontal',
      knobSource: require('./assets/images/knoob.png'),
      typeRewards: typeRewards,
      sizeIconReward: 40,
      iconRewards: iconRewards,
      getWinner: (value, index) => {
        this.setState({winnerValue: value, winnerIndex: index});
      },
      onRef: ref => (this.child = ref),
    };

This is very helpful !!!!!

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

No branches or pull requests

5 participants