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

New options for add preview percentage and number of buffer panels #61

Closed
wants to merge 6 commits into from
Closed

Conversation

ndaversa
Copy link

Usage:

previewPercentage: 10,
numberOfBufferPages: 4,
pageWidth: 250
  • Note that pageWidth is a whole number that represents a pixel width of each page in the carousel
  • When using pageWidth and values to previewPercentage are ignored as it is computed dynamically

…he left and right of the centre page.

* Note the value of `previewPercentage` is a whole number eg.

```
previewPercentage: 10
```
@cubiq
Copy link
Owner

cubiq commented Sep 30, 2013

this should be feasible with CSS alone, I should really post a demo about it

@ndaversa
Copy link
Author

@cubiq I would love to see that. The problem with a CSS approach here is it would likely use !important to override the values directly on the style attribute for each of the master pages. Unless you have something else entirely in mind. The values for left and the translates all change though using the approach I have taken here.

…uffers are used.

* Note the value of `numberOfBufferPages` is a whole (even) number eg.

```
numberOfBufferPages: 4
```
@ndaversa
Copy link
Author

ndaversa commented Oct 2, 2013

@cubiq 09ae5df might also interest you.

I find with the changes for peek/previewing I introduced in 2dff423 that the loading off screen (now partially visible) doesn't look nice. 09ae5df allows a variable number of buffer panels to avoid this problem.

It's not the cleanest work I have ever done, but it seems to be working as expected. Would love to push some of these changes to you, if you want to take them, let me know if it needs any refactoring

* Note that `pageWidth` is a whole number that represents a pixel width of each page in the carousel
* When using `pageWidth` and values to `previewPercentage` are ignored as it is computed dynamically
@ndaversa ndaversa closed this Feb 22, 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

Successfully merging this pull request may close these issues.

2 participants