darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 496 forks source link

startAt active item: how to do it? #299

Open ezersky opened 5 years ago

ezersky commented 5 years ago

Greetings!

I'm trying to use it for navigation. How to make an activated item centered on page load. Not at the beginning or the end, but in the middle.

I've tried both basic and centered, but they all have a startAt parameter with a value of 0-4. There is any possibility to use in startAt something like .active?

Task: when loading the page, show active item in the center of the frame