1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Fixed single example, added example links to readme

This commit is contained in:
Fred Chasen 2015-05-11 14:15:35 -04:00
parent 27e9046cdc
commit 134b73fc14
6 changed files with 20 additions and 12 deletions

View file

@ -51,10 +51,16 @@ Render Methods
Single: `book.renderTo("area");` Single: `book.renderTo("area");`
[View example](https://s3.amazonaws.com/epubjs/examples/single.html)
Continuous: `book.renderTo("area", { method: "continuous", width: "100%", height: "100%" });` Continuous: `book.renderTo("area", { method: "continuous", width: "100%", height: "100%" });`
[View example](https://s3.amazonaws.com/epubjs/examples/continuous.html)
Paginate: `book.renderTo("area", { method: "paginate", width: "900", height: "600" });` Paginate: `book.renderTo("area", { method: "paginate", width: "900", height: "600" });`
[View example](https://s3.amazonaws.com/epubjs/examples/pages.html)
Documentation Documentation
------------------------- -------------------------

7
dist/epub.js vendored
View file

@ -2589,9 +2589,9 @@ EPUBJS.core.defaults = function(obj) {
EPUBJS.core.extend = function(target) { EPUBJS.core.extend = function(target) {
var sources = [].slice.call(arguments, 1); var sources = [].slice.call(arguments, 1);
sources.forEach(function (source) { sources.forEach(function (source) {
if(!source) return;
Object.getOwnPropertyNames(source).forEach(function(propName) { Object.getOwnPropertyNames(source).forEach(function(propName) {
Object.defineProperty(target, propName, Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName));
Object.getOwnPropertyDescriptor(source, propName));
}); });
}); });
return target; return target;
@ -4895,6 +4895,7 @@ EPUBJS.Infinite.prototype.scrollTo = function(x, y, silent){
RSVP.EventTarget.mixin(EPUBJS.Infinite.prototype); RSVP.EventTarget.mixin(EPUBJS.Infinite.prototype);
EPUBJS.Rendition = function(book, options) { EPUBJS.Rendition = function(book, options) {
this.settings = EPUBJS.core.extend(this.settings || {}, { this.settings = EPUBJS.core.extend(this.settings || {}, {
infinite: true, infinite: true,
hidden: false, hidden: false,
@ -5280,7 +5281,7 @@ EPUBJS.Continuous = function(book, options) {
EPUBJS.Continuous.prototype = Object.create(EPUBJS.Rendition.prototype); EPUBJS.Continuous.prototype = Object.create(EPUBJS.Rendition.prototype);
EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous; EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous;
EPUBJS.Rendition.prototype.attachListeners = function(){ EPUBJS.Continuous.prototype.attachListeners = function(){
// Listen to window for resize event // Listen to window for resize event
window.addEventListener("resize", this.onResized.bind(this), false); window.addEventListener("resize", this.onResized.bind(this), false);

4
dist/epub.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@ EPUBJS.Continuous = function(book, options) {
EPUBJS.Continuous.prototype = Object.create(EPUBJS.Rendition.prototype); EPUBJS.Continuous.prototype = Object.create(EPUBJS.Rendition.prototype);
EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous; EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous;
EPUBJS.Rendition.prototype.attachListeners = function(){ EPUBJS.Continuous.prototype.attachListeners = function(){
// Listen to window for resize event // Listen to window for resize event
window.addEventListener("resize", this.onResized.bind(this), false); window.addEventListener("resize", this.onResized.bind(this), false);

View file

@ -357,9 +357,9 @@ EPUBJS.core.defaults = function(obj) {
EPUBJS.core.extend = function(target) { EPUBJS.core.extend = function(target) {
var sources = [].slice.call(arguments, 1); var sources = [].slice.call(arguments, 1);
sources.forEach(function (source) { sources.forEach(function (source) {
if(!source) return;
Object.getOwnPropertyNames(source).forEach(function(propName) { Object.getOwnPropertyNames(source).forEach(function(propName) {
Object.defineProperty(target, propName, Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName));
Object.getOwnPropertyDescriptor(source, propName));
}); });
}); });
return target; return target;

View file

@ -1,4 +1,5 @@
EPUBJS.Rendition = function(book, options) { EPUBJS.Rendition = function(book, options) {
this.settings = EPUBJS.core.extend(this.settings || {}, { this.settings = EPUBJS.core.extend(this.settings || {}, {
infinite: true, infinite: true,
hidden: false, hidden: false,