softwaretailoring / wheelnav

Animated wheel navigation JavaScript library based on Raphaël.js (SVG/VML). It can be a pie menu (radial menu, circular menu) and many more.
https://wheelnavjs.softwaretailoring.net
MIT License
702 stars 101 forks source link

1 Item in Array Breaks the Wheel #53

Closed lenichols closed 7 years ago

lenichols commented 7 years ago

If i have two or more names in my array, the wheel loads createWheel(["one","two"])

If there is only 1 result in my object call createWheel(["one"]) the wheel only loads the titles... the slices dont show up. Please help

softwaretailoring commented 7 years ago

What kind of slicePath do you use? I've checked it with PieSlice and DonutSlice and these work well.

lenichols commented 7 years ago

DonutSlice with Spreader... @softwaretailoring

softwaretailoring commented 7 years ago

I've tested the following code and it works well:

var DonutSlice = new wheelnav("DonutSlice");
DonutSlice.slicePathFunction = slicePath().DonutSlice;
DonutSlice.spreaderEnable = true;
DonutSlice.createWheel(["one"]);

Please create a JS Bin or JSFiddle with your issue or send me the url of your site where I can check your issue.

gunmiosb commented 7 years ago

I've created a JSFiddle with the issue: JSFiddle.

The percent parameter in the slice path function is very small for one value.

softwaretailoring commented 7 years ago

Hi @gunmiosb

Thank you for JSFiddle! The above code worked with current repository, but the affected parts were not released.

It was a time for a new release: v1.7.1

Please change your link to this: https://cdn.jsdelivr.net/npm/wheelnav@1.7.1/js/dist/wheelnav.min.js

Here is a modified version of your JSFiddle