gauntface / dpad-navigation

A javascript library to add basic spatial navigation to your web app. Useful until spatial focusing becomes the norm in browsers
Apache License 2.0
61 stars 15 forks source link

Navigation with a side menu #22

Open Doolali opened 2 years ago

Doolali commented 2 years ago

Hello, So far this library has done a great job at navigating, but we're struggling with a side menu (which is common for smart tvs). Is there a way to define zones?

The idea here being that when you leave from one zone to another, you can return to the previous point.

So in my example, you could go:

z - y [zone 1 exit] - b [zone 2 entrance] - c - d - e - y [back to last zone location] - e [new zone 2 entrance (defined in app logic)]

image

gauntface commented 1 year ago

That is a great question and not something I've thought of with this.

I wonder if there is some way to prevent a zone from being "focusable" at a high enough level...will have to do some experimenting (plus I've been looking for an excuse to play with this library some more).