baker icon indicating copy to clipboard operation
baker copied to clipboard

Is it possible for baker to launch on a page other then the first?

Open Prufrock1 opened this issue 15 years ago • 16 comments

I would like the app to open in the middle of the order of pages. So if there were only 3 pages I would like it to open on 2nd. Any Ideas on the best way to do this?

The UI I am look to create is a center page where the user can choose to either swipe left or swipe right.

Any Advice would be greatly appreciated. Thanks!

Prufrock1 avatar Sep 11 '11 20:09 Prufrock1

I didn't test it, but it might be possible changing line 308 of the current master (or... are you working on Baker 2.0?) where it says:

currentPageNumber = 1;

Changing 1 to the default page number you want to start with. ;)

It should be something similar in Baker 2.0. ;)

folletto avatar Sep 11 '11 23:09 folletto

Great, that worked perfectly. The currentPageNumber var is still on line 308 for baker 2.0. Thanks!

Prufrock1 avatar Sep 12 '11 15:09 Prufrock1

Awesome. :) We should make a constant out of it. ;)

folletto avatar Sep 12 '11 15:09 folletto

I agree. Quick note, this is my first time working with an active open source project- and I'd like to help out more. So let me know if there are any tasks to do. I'm a beginner Obj-C programmer coming from a web development background. So I have a questions about constants- where do there live? my assumption would be that they would go into the book.json file, which seem to act like a place to a settings page.

Prufrock1 avatar Sep 12 '11 15:09 Prufrock1

Right now, they live in the Obj-C side of the code, but you are right, they are going to be moved inside the book.json manifest that will be soon added, so nobody has to edit Obj-C code anymore. :)

Cheers!

folletto avatar Sep 12 '11 15:09 folletto

So Just to be clear, the book.json doesn't actually do anything in 2.0?

Prufrock1 avatar Sep 12 '11 16:09 Prufrock1

Nope: as you can see in this issue tracker the feature is still open: we're still implementing it. :) On Baker 2.0 you have to edit the constants at the top of the Obj-C file. ;)

folletto avatar Sep 12 '11 16:09 folletto

Alright

Prufrock1 avatar Sep 13 '11 23:09 Prufrock1

This worked great for me when making a Japanese book. I set the current page to the last page and added the page files in the opposite order in book.json. The only thing is that you have to hide the loading page number color, which I haven't been able to do yet.

lostinjapan avatar Nov 14 '11 04:11 lostinjapan

I mean that the loading page numbers won't match up with what the page numbers really are.

lostinjapan avatar Nov 14 '11 05:11 lostinjapan

I found the answer. The page number color is now a constant! Thanks!

"-baker-page-numbers-color": "#FFFFFF",

lostinjapan avatar Nov 14 '11 05:11 lostinjapan

This worked great for me too, but next step is how to scroll Index Bar from right to left or in vertical position?

Thanks for help.

Sror avatar Jan 13 '13 09:01 Sror

It all depends on the size of the page: if your index page has a small width and long height, then in will be vertical on the side. Baker reads the page width/height and positions it accordingly. :)

folletto avatar Jan 13 '13 13:01 folletto

Grazie! anyway to make it scroll from right to left or open in last item?

PS: it will be great if you can implement RTL support (for Hebrew and Arabic).

Sror avatar Jan 13 '13 13:01 Sror

The automated scroll is not implemented and tracked on issue #350.

The RTL support is already there, since it's provided by the web browser itself. Just build the HTML page in that way. :)

folletto avatar Jan 13 '13 13:01 folletto

Davvero Grazie Folletto! Ho risolto il tutto, mi rimane solo cambiare la direzione dello scorrimento della Index bar o se possibile al doubleTap mi apre l'ultima voce dell'index invece della prima.

Sror avatar Jan 13 '13 13:01 Sror