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

How to start without selected menu item #59

Closed ozeone closed 7 years ago

ozeone commented 7 years ago

I am using HTML5 data-attributes for my setup. Is there any way i can get the wheel to not select a menu item on load (and also get the regular pointer icon like the rest)

My setup below

<div id="divWheel" 
        data-wheelnav 
        data-wheelnav-titlewidth="45" 
        data-wheelnav-titleheight="45"
        data-wheelnav-navitemtitle="test" 
        data-wheelnav-slicepath="CogSlice"
        data-wheelnav-spreaderradius="20"
        data-wheelnav-navangle="180"
        data-wheelnav-slicetransform="RotateTitleTransform"
        data-wheelnav-wheelradius="105">
<div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-mok.png")" onmouseup="setUser('#tab-mok');"></div>
<div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-kevin.png")" onmouseup="setUser('#tab-kevin');"></div>
<div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-henrik.png")" onmouseup="setUser('#tab-henrik');"></div>
<div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-anna.png")" onmouseup="setUser('#tab-anna');"></div>
softwaretailoring commented 7 years ago

Hi @ozeone You can achieve it with data-wheelnav-init attribute, more info here.

And then use wheel.selectedNavItemIndex = null; before createWheel.