.navigation
Navigation is not simple task and can be done in many ways depending on the use case. This is why we have two categories of navigation; spatial and direct.
Spatial navigation
Often useful when you want to navigate based on buttons or gesture. For example a swipe to the left trigger a turnLeft
, to the right a turnRight
. It's easier to call these spatial methods because it correlate directly with what the user is expecting and is especially useful for UX elements.
Direct navigation
The represent methods such as goToItem
, gotoPage
, goToUrl
, etc. They are not directional nor spatial and are used when you know exactly where you want to go. They are usually used for navigating by bookmarks, table of contents, links and other.
.state$
.state$
Emit as soon as you subscribe to it.
.goToNextSpineItem()
.goToNextSpineItem()
Navigate to the next available spine item.
.goToPreviousSpineItem()
.goToPreviousSpineItem()
Navigate to the previous available spine item.
.goToLeftSpineItem()
.goToLeftSpineItem()
Navigate to the next spine item available at the left. It will never navigate if the pages turn vertically.
.goToRightSpineItem()
.goToRightSpineItem()
Navigate to the next spine item available at the right. It will never navigate if the pages turn vertically.
Last updated