X-Git-Url: http://git.rot13.org/?p=bookreader.git;a=blobdiff_plain;f=BookReaderDemo%2FBookReaderJSSimple.js;h=4dd476d531d5ffe0c23e1cc4e1db05f582c08851;hp=4d084704f9bc8f47373fa5663595bfb8bf62ff0a;hb=HEAD;hpb=1c5dbee137936492ff6f85d798da014e5d3e73e6 diff --git a/BookReaderDemo/BookReaderJSSimple.js b/BookReaderDemo/BookReaderJSSimple.js index 4d08470..4dd476d 100644 --- 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 -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+"}$"); @@ -77,8 +80,20 @@ br.getPageNum = function(index) { br.numLeafs = 15; // Book title and the URL used for the book title link -br.bookTitle= 'Open Library Bookreader Presentation'; +br.bookTitle= 'Open Library BookReader Presentation'; br.bookUrl = 'http://openlibrary.org'; +// Override the path used to find UI images +br.imagesBaseURL = '../BookReader/images/'; + +br.getEmbedCode = function(frameWidth, frameHeight, viewParams) { + return "Embed code not supported in bookreader demo."; +} + // Let's go! br.init(); + +// read-aloud and search need backend compenents and are not supported in the demo +$('#BRtoolbar').find('.read').hide(); +$('#textSrch').hide(); +$('#btnSrch').hide();