projects
/
bookreader.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/master'
[bookreader.git]
/
BookReaderDemo
/
BookReaderJSSimple.js
diff --git
a/BookReaderDemo/BookReaderJSSimple.js
b/BookReaderDemo/BookReaderJSSimple.js
index
4d08470
..
fe3219a
100644
(file)
--- a/
BookReaderDemo/BookReaderJSSimple.js
+++ b/
BookReaderDemo/BookReaderJSSimple.js
@@
-18,7
+18,10
@@
br.getPageHeight = function(index) {
// We load the images from archive.org -- you can modify this function to retrieve images
// using a different URL structure
// We load the images from archive.org -- you can modify this function to retrieve images
// using a different URL structure
-br.getPageURI = function(index) {
+br.getPageURI = function(index, reduce, rotate) {
+ // reduce and rotate are ignored in this simple implementation, but we
+ // could e.g. look at reduce and load images from a different directory
+ // or pass the information to an image server
var leafStr = '000';
var imgStr = (index+1).toString();
var re = new RegExp("0{"+imgStr.length+"}$");
var leafStr = '000';
var imgStr = (index+1).toString();
var re = new RegExp("0{"+imgStr.length+"}$");
@@
-77,8
+80,11
@@
br.getPageNum = function(index) {
br.numLeafs = 15;
// Book title and the URL used for the book title link
br.numLeafs = 15;
// Book title and the URL used for the book title link
-br.bookTitle= 'Open Library Book
r
eader Presentation';
+br.bookTitle= 'Open Library Book
R
eader Presentation';
br.bookUrl = 'http://openlibrary.org';
br.bookUrl = 'http://openlibrary.org';
+// Override the path used to find UI images
+br.imagesBaseURL = '../BookReader/images/';
+
// Let's go!
br.init();
// Let's go!
br.init();