Skip to content

Slide by item#60

Open
josephnvn wants to merge 3 commits into
withassociates:masterfrom
josephnvn:patch-1
Open

Slide by item#60
josephnvn wants to merge 3 commits into
withassociates:masterfrom
josephnvn:patch-1

Conversation

@josephnvn
Copy link
Copy Markdown

I had this specific requirement where I need to scroll only one item and not the whole screen (or bunch of items on screen). So, I have introduced slideByItem as an optional and updated slideByPages to handle that!

I had this specific requirement where I need to scroll only one item and not the whole screen (or bunch of items on screen). So, I have introduced slideByItem as an optional and updated slideByPages to handle that!
@jgwhite
Copy link
Copy Markdown
Contributor

jgwhite commented Jul 15, 2015

Nice!

Couple of thoughts:

  • Could slideByItem take a selector? i.e. slideByItem: 'li'
  • From what I can tell, it looks like this expects items will all be of equal width? Could we use the selector to find the next visible item?

Updated the code to address the irregular widths of items.
…t to true

Notices that I forgot to update the bullets count! and so the addition...
@jamie White : Thanks for the comments Jamie. I have considered the irregular width of items and dropped a fix in previous commit. However I did not change the slideByItem option type to element selector (as you suggested.), because 'li' is what microfiche is taking as an item anyway. Let me know your thoughts!
@jgwhite
Copy link
Copy Markdown
Contributor

jgwhite commented Aug 20, 2015

Hi @josephnvn

Sorry it’s been so long since we last discussed this PR. I still think it looks great.

What do you think about applying similar logic to slideToPage and jumpToPage?

More generally: slideByPage becomes something of a misnomer when we’re in slideByItem mode. Do you think we should create dedicated methods for this behaviour? If so, we could detect the presence of the slideByItem option during construction and switch to using the item-based motion methods internally for all operations.

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

Successfully merging this pull request may close these issues.

2 participants