Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't have weight working #4

Closed
climentjoan opened this issue Oct 23, 2020 · 2 comments
Closed

Can't have weight working #4

climentjoan opened this issue Oct 23, 2020 · 2 comments

Comments

@climentjoan
Copy link

climentjoan commented Oct 23, 2020

Hi there,

Thank you so much for the weight addon, I'm trying to have it working and I'm unable to do it.

I have version "vue-fortune-wheel": "^0.3.4".

My FortuneWheel looks like:

<FortuneWheel
  v-if="showWheel"
  style="width: 100%"
  borderColor="#584b43"
  :borderWidth="1"
  :textLength="3"
  :useWeight="true"
  :fontSize="fontSize"
  :textRadius="230"
  :prizes="prizes"
  @rotateStart="onCanvasRotateStart"
  @rotateEnd="onRotateEnd"
/>

And I have weight property defined in every prize.

When I enter the wheel, I get this warning:
[Vue warn]: Error in created hook: "TypeError: Cannot read property 'toString' of undefined"

And it goes away when I insert probabilities in every prize, then I have it working but it's using probabilities and not weights.

Thanks!

@XiaoLin1995
Copy link
Owner

Sorry, I did not have this problem here, but a version was updated today, you can try to update.
And are you sure that the value of each prize is correct?

@climentjoan
Copy link
Author

It's working now with version 1.0.0.

Thanks!

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

No branches or pull requests

2 participants