Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activeFloor vs. activePage (or activeIndex) #40

Closed
acturbo opened this issue Mar 17, 2014 · 4 comments
Closed

activeFloor vs. activePage (or activeIndex) #40

acturbo opened this issue Mar 17, 2014 · 4 comments

Comments

@acturbo
Copy link

acturbo commented Mar 17, 2014

I think there is some confusion about what a "floor" is. Ascensor treats all elements on the same x axis as being on the same floor.

e.g. if we have 4 pages as follows (pure horizontal navigation):
[1,0]
[1,1]
[1,2] <--- e.g. this is the current page, current index
[1,3]

ascensor reports that all of these pages would be activeFloor = 1, or "current-floor" =1.

This is good for some situations, but i would like to see a property that returns the "page" or activeIndex that we're currently on. In the example above, we are on the 3rd page, ascensor should return 3 (or 2 if it's zero-based) for this new activeIndex property.

Why?
The floor.from and floor.to properties in StartScroll and ScrollEnd report that all these pages are on the same floor as well, so you can never trap page change events that happen on the same "floor".

Unless i'm missing something, I suggest we need a new property activeIndex.

thanks.

@kirkas
Copy link
Owner

kirkas commented Mar 17, 2014

Would you be able to provide an example? Because it work fine for me and alway return the index of the floor and note his position on the axis!

@acturbo
Copy link
Author

acturbo commented Mar 17, 2014

ok perfect, if it works properly for you, then this is great.
Let me try to narrow down the issue. It may be my own code.

@kirkas
Copy link
Owner

kirkas commented Mar 17, 2014

What code do you use to get the floor information?

@acturbo
Copy link
Author

acturbo commented Mar 17, 2014

it was my code. thanks for double checking.

@acturbo acturbo closed this as completed Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants