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

Trying to remove unneeded pages from flipbook using Steve Jobs sample #686

Open
andrewrkaufman2001 opened this issue Jul 13, 2024 · 4 comments

Comments

@andrewrkaufman2001
Copy link

I have about 83 pages in my flipbook that I made using the Steve Jobs sample project. I'm trying to remove the rest of the pages so it goes from my last page directly to the back book jacket.

I've tried changing "pages:112" in index.html to "pages:83" (as seen below), but everytime I change the number my whole flipbook disappears.

flipbook.turn({
elevation: 50,
acceleration: !isChrome(),
autoCenter: true,
gradients: true,
duration: 1000,
pages: 112,
when: {

Any help would be much appreciated!

@Wolli4711
Copy link

You have to change the max numbers of pages also in file ../css/.css and ../jr/.jr

index.html :

flipbook.turn({
...
when: {
turning: function(e, page, view) {
...
if (page<book.turn('pages'))
$('.sj-book .p82').addClass('fixed');
else
$('.sj-book .p82').removeClass('fixed');
...
+++++++++++++++++++++++

*.css :

.sj-book .p1,
.sj-book .p2,
.sj-book .p3,
.sj-book .p82,
.sj-book .p83{
background-color:white;
background-image:url("../pics/book-covers.jpg") !important;
}
...
.sj-book .p82{
background-position:-1024px 0 !important;
}

.sj-book .p83{
background-position:-1536px 0 !important;
}
+++++++++++++++++++++++

*.js :

function updateDepth(book, newPage) {
...
if (newPage<pages-3)
$('.sj-book .p82 .depth').css({
width: depthWidth,
right: 20 - depthWidth
});
else
$('.sj-book .p82 .depth').css({width: 0});
}
+++++++++++++++++++++++

@andrewrkaufman2001
Copy link
Author

I tried making all these changes, but whenever i go into index.html and change 112 to 82 i get the blank white screen

flipbook.turn({
elevation: 50,
acceleration: !isChrome(),
autoCenter: true,
gradients: true,
duration: 1000,
pages: 112,
when: {

@Wolli4711
Copy link

please check the maximum number of pages. It must be even.
84 instead of 83.

@Wolli4711
Copy link

index.html:

...
<div id="canvas">
	<div id="book-zoom">
		<div class="sj-book">
			<div depth="5" class="hard">
				<div class="side"></div>
			</div>
			<div depth="5" class="hard front-side">
				<div class="depth"></div>
			</div>
			<div class="own-size"></div>
			<div class="own-size even"></div>
			<div class="hard fixed back-side p83">
				<div class="depth"></div>
			</div>
			<div class="hard p84"></div>
		</div>
	</div>
</div>
...

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