Wheelnav.js, not clickable NavItems

133 views Asked by At

I've started using Wheelnav.js. Currently my Wheel is toogled on/off with pressing and releasing X. I also got some hover effects, my Problem is that my NavItems are Clickable.. if i click a item it is "selected" and i cant hover over it anymore.

https://gyazo.com/29f73fd2fb0f8bbf1f634931686c3ec6

In this example i clicked on Item1

1

There are 1 answers

0
Gábor Berkesi On

You have to set the selected property to false and refresh the wheel.

window.onload = function () {
    wheel = new wheelnav("wheelDiv");
    wheel.createWheel();
    wheel.animateFinishFunction = disableSelected;
};

var disableSelected = function () {
    for (var i = 0; i < this.navItemCount; i++) {
        if (this.navItems[i].selected) {
            this.navItems[i].selected = false;
            this.navItems[i].refreshNavItem(true);
        }
    }
}